I have a big json file, with the format below:
{
"enTitle": “my product",
"esTitle": “es prod",
"esDescription": “es description",
"enDescription": “description",
"URL": “url",
"Image": “imagepath",
"HasLandingPage": "1",
"AddInfo": "info"
}
How can I possibly change it to the format below: is that possible? I need it to be in this format so I can add it to a search engine api(elastic swiftype) as document. I looked a lot of questions couldn't find what I need. Apologize in advance if it's duplicate. is there a way to write a program for this conversion?
{"name": "enTitle", "value": "my product", "type": "string"},
{"name": "esTitle", "value": "es prod", "type": "string"},
{"name": "esDescription", "value": "es description", "type": "string"},
{"name": "enDescription", "value": "description", "type": "string"},
{"name": "URL", "value": "url", "type": "string"},
{"name": "Image", "value": "imagepath", "type": "string"},
{"name": "HasLandingPage", "value": "1", "type": "string"},
{"name": "AddInfo", "value": "info", "type": "string"}
A dict needs unique keys, you can put multiple dicts in a list.