Okay, so you're asked for a one-liner instead of the multiple steps you've given. There surely are many other ways, here's one:
:%s/.*=\s*\(\d\+\)\n/\1, / | normal! $xr]^OI[
This does the removal of the stuff before = and the joining of lines both with :substitute (adapt the :% range to suit your needs), by capturing only the number. I then use normal mode commands to get rid of the trailing comma and add the square brackets. (Type ^O as Ctrl-V Ctrl-O; Ctrl-Q CTRL-O on Windows.) If you have the surround.vim plugin, this could be further simplified. One could also use a second :.substitute to achieve the same.
Actually, I probably would have used visual blockwise mode, a special J mapping, and normal mode to achieve this.