can someone tell me the formula to extract and edit the json file?
the json file is this: [ { “id”: “1”,“role”: “user1”, “content”: “msg1”,}, {“id”: “2”,“role”: “user2”, “content”: “msg2”}]
I want to edit it to look like this >
[{“role”:“user1”,“content”:“msg1”},{“role”: “user2”, “content”:“msg2”}]
Use MAP()
Something like MAP(yourList, {"role": user.role, "content": user.content}
[
{"id": "1","role": "user1", "content": "msg1"},
{"id": "2","role": "user2", "content": "msg2"}
]
thank you very much it worked
Just a quick note, when sharing json with us, type ``` prior to your formula so it looks more readable, like so:
