removechild - Delete all occurences from JSON Array -


i have 32mb-json-file represents database. has following structure:

{    "players": [          {             "item1":"a"             "item2":"b"             "item3":"c"          },          {             "item1":"d"             "item2":"e"             "item3":"f"          }          {            ...          }    ] } 

in order reduce weight, i'd delete "item1" , associated values. best way it? mean manually text editor.

you can use sublime text this:

  1. select find > replace
  2. switch regular expressions (alt + r)
  3. in find enter regular expression:

    ."item1".\n

  4. leave replace empty

  5. click replace all

after sample looks this:

{    "players": [          {             "item2":"b"             "item3":"c"          },          {             "item2":"e"             "item3":"f"          }          {            ...          }    ] } 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -