I have the following string:
{"attributes":{"name":"James Franco","sectors":{"all":{"name":"all","rank":1},"second":{"name":"Actor","rank":1},"third":{"name":"all","rank":1},"team":"BR",{"name":"all","rank":1},"rank":1,"trending":101,rank":1,"BPR":6.50,"SPR":6.10}}
I want to only extract the 'name', 'BPR' & 'SPR' and their respective values from the one line, and output all three to one line, in a new file.
Can anyone tell me please, how to do this using either gnu sed, cut etc ?