Forum Discussion

nicolaiibsen's avatar
nicolaiibsen
Copper Contributor
May 04, 2019

Change values in many JSON file often - What is the best way?

I need to update prices/values often in many JSON files. The reason why is, that Gravity forms for products in a webshop. A form import/export for Gravity forms can only be an JSON file, and have to have the excact same structure as the original. My data which is updated often, it's in excel, and I was looking for a solution where I could copy/paste it from excel to the JSON file somehow or similar. The basicPrice is an example (line 12 from the bottom).

 

I've been searching for 2 days for a good solution. A mix of power query, online converters from JSON, CSV and back to JSON, and then PHPStorm. The only solution so far i came across is PHPStorm, then format the JSON file and manually go through it, but it's too time consuming.

 

{ "type":"product", "id":158, "label":"Pr. opfyldning", "adminLabel":"DG TEST 1/dag 12md kontant", "isRequired":false, "size":"medium", "errorMessage":"", "visibility":"visible", "inputs":[ { "id":"158.1", "label":"Navn", "name":"" }, { "id":"158.2", "label":"Pris", "name":"" }, { "id":"158.3", "label":"Antal", "name":"" } ], "inputType":"singleproduct", "enablePrice":null, "formId":72, "description":"", "allowsPrepopulate":false, "inputMask":false, "inputMaskValue":"", "inputMaskIsCustom":false, "maxLength":"", "labelPlacement":"", "descriptionPlacement":"", "subLabelPlacement":"", "placeholder":"", "cssClass":"", "inputName":"", "noDuplicates":false, "defaultValue":"", "choices":"", "conditionalLogic":{ "actionType":"show", "logicType":"all", "rules":[ { "fieldId":"134", "operator":"is", "value":"Hver 12 m\u00e5ned" }, { "fieldId":"142", "operator":"is", "value":"Kontant" } ] }, "productField":"", "basePrice":"6.885,00 kr.", "disableQuantity":true, "multipleFiles":false, "maxFiles":"", "calculationFormula":"", "calculationRounding":"", "enableCalculation":"", "displayAllCategories":false, "useRichTextEditor":false, "fields":"", "displayOnly":"" },

2 Replies

Resources