what is the best way to remove a JSON array from _raw JSON data and reserialize to _raw? I have a section of JSON data that I want to remove.
Eval the JSON part of _raw to a new field. Parse it. Serialize as key value (or whatever) to _raw.And / or replace the JSON in _raw with the result of the parsing,if you want to keep the surrounding data in _raw.
Assuming it is a string such as this..
Just remove it by first making it an object, and then remove the field as so:
That work for you <@UJYBKAR2Q>?
i will check it out here in a sec
If it is already an object `{}` vs. an ascii string `a`, then just the Remove Fields in an Eval Function is all you need.
No need to do a `JSON.parse(_raw)`, which makes it an object if you ever need to do that.
It is already an object
Perfect, then just an Eval Function with the Remove Fields. You can double click the array field name to copy it, then paste it into the Remove Fields section of an Eval Function.
ok so i did a remove fields and now that needs to be written back to _raw. I used serialize witj JSON object, now I have two _raw fields LOL
Just the Eval only is needed.
you are correct, just an eval to remove the section I did not need did the trick
Sometimes the easy button works!
Excellent!
Reply
Login to the community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.