How can I remove json attributes on elixir?

How can I remove json attributes on elixir?

What do you consider a “JSON attribute”?

As far as I remember, JSON has lists and objects, while objects are key value pairs.

No attributes at all.

So please clarify what you mean when speaking about attributes and also tell us what library you use to handle JSON.

I am using Poison. And I wanted to remove a key with value for example{"test": "test", "home": "Brazil"}.
I wanted to make {"test": "test"}.
My json will be generic so i will have to remove just some keys /values.

Parse it into a map, alter the map in whatever way you wish, re-encode it into json.

3 Likes