LoghinVladDev / CDS

Custom Template Library, C++, Functional Programming Support
GNU General Public License v3.0
3 stars 0 forks source link

CDS-4: Filter function for JSON array objects #65

Open stefan-nistor opened 2 years ago

stefan-nistor commented 2 years ago

Like jsonArrayObj.filter( "label", "labelData" ) which returns a JSONArrayObject that contains filtered data. Example:

Having this JSON file

{
  "cars": 
      [
        {
          "brand" :  "Logan",
          "fuel" : "gas"
        } ,
        {
          "brand" : "BMW",
          "fuel" : "diesel"
        }
      ]
}

After cars.filter("fuel", "gas") call a new JSON file should be created/returned

{
  "cars": 
      [
        {
          "brand" :  "Logan",
          "fuel" : "gas"
        } 
      ]
}
LoghinVladDev commented 1 year ago