Giter VIP home page Giter VIP logo

Comments (3)

Ronserruya avatar Ronserruya commented on June 18, 2024 6

The actual more complex parsing I try to do is using this JSON:

...
Trying to get the facebook url
websites.items.[*].properties[?(@.website_type == 'facebook')].url

This works here http://jsonpath.herokuapp.com/

I figured out how to do this, using websites.items[?(@.properties.website_type == 'facebook')].properties.url.

I see that the filter op can only be used on lists in your implementation? , why is that? and if so, the first simple filter cannot be done?

from jsonpath-ng.

Ronserruya avatar Ronserruya commented on June 18, 2024

The actual more complex parsing I try to do is using this JSON:

{
   "websites":{
      "items":[
         {
            "type":"Website",
            "properties":{
               "updated_at":1553902435,
               "website_name":"homepage",
               "website_type":"homepage",
               "created_at":1395793311,
               "url":"http://***.com"
            }
         },
         {
            "type":"Website",
            "properties":{
               "updated_at":1553902435,
               "website_name":"facebook",
               "website_type":"facebook",
               "created_at":1395793311,
               "url":"https://www.facebook.com/***"
            }
         },
         {
            "type":"Website",
            "properties":{
               "updated_at":1553902435,
               "website_name":"twitter",
               "website_type":"twitter",
               "created_at":1395793311,
               "url":"https://www.twitter.com/***"
            }
         }
      ]
   }
}

Trying to get the facebook url
websites.items.[*].properties[?(@.website_type == 'facebook')].url

This works here http://jsonpath.herokuapp.com/

from jsonpath-ng.

mdq-noppera avatar mdq-noppera commented on June 18, 2024

Are these repos abandoned?

from jsonpath-ng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.