Here is the problem i am facing, some of my nbrs are stored as string and some as numbers and they represent Phone numbers. they are stored in an array called phones and look like this
{
"id": "da7dae3e-2313-45c4-901a-864a5b15bd0a",
"number": 2135551212,
"sms": true,
"type": "Mobile"
}
So my question is how can i update all number values in the phones array in my docs of _type contact to the same value as it is now just as a string. I tried the Basic set but since i have to UNNEST the Phones array it does not like it
UPDATE `Contacts` c
SET p.`number` = to_string(p.`number`)
UNNEST c.phones p
where c._type = 'contact'