Guest

Preview Tool

Cisco Bug: CSCvs72232 - JSONPATH Query does not return array as expected when only 1 element

Last Modified

Jan 20, 2020

Products (1)

  • Cisco CloudCenter Suite

Known Affected Releases

5.1(3)

Description (partial)

Symptom:
When using JSONPATH Query to pull an array of elements, if there is only one element matching the query it returns the raw value of that object, instead of the array structure that is expected.

i.e. if you were expect the result of a query with 2 elements to look like:

["element1","element2"]

If you removed element2 from the json being queried the resulting jsonpath query would be:

element1

when it should be:

["element1"]

Conditions:
Using JSONPATH query to pull out an array of values
Bug details contain sensitive information and therefore require a Cisco.com account to be viewed.

Bug Details Include

  • Full Description (including symptoms, conditions and workarounds)
  • Status
  • Severity
  • Known Fixed Releases
  • Related Community Discussions
  • Number of Related Support Cases
Bug information is viewable for customers and partners who have a service contract. Registered users can view up to 200 bugs per month without a service contract.