I have Given this JSON structure:
[{"variant_name":"Size","variant_options":["S","M","L","a"]}]
How would you delete an object from the array by key/value? Let's say I wish to delete the element with variant_options = S, how to get this result:
[{"variant_name":"Size","variant_options":["M","L","a"]}]
I tried but did't get any result
Given this JSON structure:parse it first, then you're just dealing with an array with a single object in it - far simpler than dealing directly with a JSON string