Comments - Need delete same values in a json

7 months, 1 week ago Ian Gilfillan

JSON_MERGE_PATCH does not preserve members with duplicate keys. It doesn't give you quite what you said you wanted, but may be helpful for what you're trying to achieve:

SELECT JSON_MERGE_PATCH(@json1,@json2);
+----------------------------------------------------------------------------+
| JSON_MERGE_PATCH(@json1,@json2)                                            |
+----------------------------------------------------------------------------+
| {"ccmilestones": "10701", "descriptions": "10702,10703", "lolo": "lolita"} |
+----------------------------------------------------------------------------+
 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.