Inist-CNRS / node-jbj

Like XSL/XML but for JSON.
http://Inist-CNRS.github.io/jbj-playground/
13 stars 3 forks source link

Add a "getProperty" action #9

Closed parmentf closed 9 years ago

parmentf commented 9 years ago

At the moment, there is no way to extract one element of an array / one property of an object.

Ex:

{
  "set": [ "a", "b", "c" ],
  "getProperty": "0"
}

should return

"a"

And

{
  "set": { "a": 0, "b": 1, "c":2 },
  "getProperty": "b"
}

should return

1