3 ms·
jq has a very simple `jv_getpath()` that is a smaller "language" still (the "language" being an array of string and integer indices). I believe Jansson and oth
by cryptonector 3y ago
jq has a very simple `jv_getpath()` that is a smaller "language" still (the "language" being an array of string and integer indices). I believe Jansson and others also have similar get-path functionality. They don't have the asterisk feature that this has (which is not like .[] in jq), and which looks admittedly quite useful (in terms of ease of use but also in terms of heap allocation avoidance). OTOH this doesn't allow access to non-ident-like object fields except via the asterisk feature. Neat!
- sshine 3y ago> They don't have the asterisk feature that this has In jq I believe you can get the asterisk behaviour with ‘map(...)’, but using significantly more characters.
- cryptonector 3y agoIn jq you'd just write `.[$name]` and let something else bind `$name`. But I was talking about the C bits of jq.