Essentially I want to be able to get the value “routerKey” by looking for “router_key”. I could probably get this done through entirely too many complicated steps, but was wondering what the best practices are for parsing this kind of response.
Did you got that as an ASCII response? It looks as if it were already an elixir map… If though this was once JSON and you have converted it already, then you do not need to parse anymore, but to extract.
So as I’ve understood you, you want to iterate the list and convert them in a way, that the value of "custom_field_name" is a new key and the value of "data" then is the value.
To extract the info as described by me from a single Item in the list, just do the following:
Thanks for that. After posting I started thinking about a for comprehension. There’s also a benefit besides style. If one of the map entries is missing one of the keys, the Enum.into approach will give a match error, but for will ignore them.