Hi all,
I have to move following part of documents (the type part) from documents where exits:
{
"id": "id1",
...
"type": {
"category": {
"A": {
"settings": {
"_value": "{\"no\":1,\"max\":1,\"last\":1568123964693}"
}
}
},
"B": {
"settings": {
"_value": "{\"no\":1,\"max\":1,\"last\":1568123964693}"
}
}
}
...
}
into a new format in a new bucket, like below
{ "id": "id1", "types": { "categories": [{ "name ": "A.settings", "no": 1, "max": 1, "last": "1568123964693" }, { "name ": "B.settings", "no": 1, "max": 1, "last": "1568123964693" } ] } }
How can I achieve this?
I’ve tried using INSERT-SELECT queries, but I couldn’t do the select to return the data in new format.
Thanks in advance for any pointers.