apoc.convert.getJsonProperty

Function APOC Core

apoc.convert.getJsonProperty(node,key[,'json-path']) - converts serialized JSON in property back to original object

Signature

apoc.convert.getJsonProperty(node :: NODE?, key :: STRING?, path =  :: STRING?) :: (ANY?)

Input parameters

Name Type Default

node

NODE?

null

key

STRING?

null

path

STRING?

Usage Examples

The examples in this section are based on the following sample graph:

CREATE (:Person {json:'{a:[1,2,3]}'});
MATCH (p:Person)
RETURN apoc.convert.getJsonProperty(p, "json") AS output;
Table 1. Results
Output

{a: [1, 2, 3]}

MATCH (p:Person)
RETURN apoc.convert.getJsonProperty(p, "json", "$.a") AS output;
Table 2. Results
Output

[1, 2, 3]