sometimes it's useful to process objects by iterating through the key value pairs
python has
obj = {"a": 1, "b": 2}
{k:v*2 for k,v in obj.items()}
jq has
echo '{"a": 1, "b": 2}'|jq '[to_entries[]|{key: .key, value: (.value * 2)}]|from_entries'
is there something similar in jsonnet? it seems like the list and object comprehensions could return (k,v) tuples if the right hand side is an object
sometimes it's useful to process objects by iterating through the key value pairs
python has
jq has
is there something similar in jsonnet? it seems like the list and object comprehensions could return (k,v) tuples if the right hand side is an object