Closed aammundi closed 3 years ago
obj = { 'answer': 42, 'arr': [None, True, 3.14], 'truth': { 'coord': 'out there' } }
Is there any way for me to specify a set of paths to enable something like:
jsonmget(path=Path(['.answer', '.arr']), 'obj')
=> ``` [ 'answer': 42, 'arr': [None, True, 3.14]]
jsonmget is not meant for multi paths but for multi keys: JSON.MGET <key> [key ...] <path>
jsonmget
JSON.MGET <key> [key ...] <path>
To get multi paths all you need to do is send a union path(v2.0.0+):
$.["answer","arr"]
thanks very much
Is there any way for me to specify a set of paths to enable something like:
jsonmget(path=Path(['.answer', '.arr']), 'obj')
=> ``` [ 'answer': 42, 'arr': [None, True, 3.14]]