UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21. Read more.
UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21.Read more.
Cadet 3rd Class Cadet 3rd Class
Cadet 3rd Class
381 views

Json Path Issue in VUGEN/Performance Center

Hello,

I am trying to use a json path query to get all products or all bundle with products.

web_reg_save_param_json(
        "ParamName=products",                   
        " QueryString=$..products[?(@.type=='product' && || (@.type=='bundle' ))].id",          
        "SelectAll=Yes",
        "Notfound=Warning",
        "SEARCH_FILTERS",
        "Scope=Body",
        "LAST");

My problem comes when I try to use "@.bundleproducts.length!=0" with bundles   withouth getting matches even if there is an OR

web_reg_save_param_json(
        "ParamName=products",                   
        " QueryString=$..products[?(@.type=='product' && || (@.type=='bundle' && @.bundleproducts.length!=0))].id",          
        "SelectAll=Yes",
        "Notfound=Warning",
        "SEARCH_FILTERS",
        "Scope=Body",
        "LAST");

I tested the query in VSCode and online json path evaluator like https://jsonpath.com/ and it worked correctly, but in vugen/performance center  I get no matches.

 

¿I missed any option or vugen has a possible bug with json path queries?

 

Regards,

Adrian.

Labels (3)
0 Likes
2 Replies
Vice Admiral Vice Admiral
Vice Admiral

What version of:

  • VuGen?
  • Performance Center?

 

0 Likes
Cadet 3rd Class Cadet 3rd Class
Cadet 3rd Class

I am using the Vugen and Performance Center 12.61 version

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.