'Editing a big JSON file containing arrays of big objects

I have many big JSON files containing arrays of objects, arrays of arrays etc. I need to add more objects into the JSON files (keeping the schema of the file same). and modify the fields of JSON files systematically but not sure how to do it in an intelligent way.

e.g.: JsonFile:

{ 
  "objA": [
          { "f1"= 1, ...  } , {"f2"=2,..}, ...}
          ]
.
.

}

Now if i need to add 100 more objects in objA Array with "f1" fields incremented from the last one. How to do that fast using vim. I am pasting the object using 100p but incrementing the field manually which i think could be done in a better way. I need to do this often and with different fields. Any suggestion using VIM tool or any other tool , i would really appreciate.

Thanks. PG.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source