Extract JSON while preserving missing/null/type
#JSON.SET/JSON.GET operate on typed JSON, not hashes. $ paths select array-shaped matches: JSON.GET returns JSON text '[2]', '[null]' and '[]' for numeric, JSON-null and missing paths. JSON.TYPE returns native type arrays ["integer"], ["null"] and []. A missing key is a separate nil reply. Client protocol/library decoding still matters.
Fragment
Native commands in one redis-cli session; # lines are explanatory, not commands. Examples use disposable ref:* keys.