Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

json range operator (:) not working

The JSONPath range select operator `:` does seem to work:

For example, I have this payload

{
  "Products": [{
    "id": "1",
    "name": "cheese"
  }, {
    "id": "2",
    "name": "ham"
  }, {
    "id": "3",
    "name": "apple"
  }, {
    "id": "4",
    "name": "orange"
  }, {
    "id": "5",
    "name": "crackers"
  }, {
    "id": "6",
    "name": "ice cream"
  }]
}

I applied

< JSONPath>$.Products.[1:3]</JSONPath> in the extractVariable

I am expecting the following:

[ { "id": "2", "name": "ham" }, { "id": "3", "name": "apple" } ]

But I am getting the following error instead.

{
  "fault": {
    "faultstring": "ExtractVariables EV-ApplyProductsListOffset: Json path parsing failed for for flow variables response.content",
    "detail": {
      "errorcode": "steps.extractvariables.JsonPathParsingFailure"
    }
  }
}

I checked my JSONPath Syntax at http://jsonpath.com/ , and I am getting the expected result.

I am seriously pazzled as to why it does not work in Apigee.

I am wondering if the JSONPath support in the ExtractVariable only partial?

Any help would be much appreciated.

0 4 668
4 REPLIES 4
Top Solution Authors