0

I am a novice developer and I am stuck here since last few days. I am using jQuery query builder parser for laravel by timgws and sending the form data by Ajax. I can get the query in the controller but I want to access the JSON data before making the query. I was following this reference but i can't access the data even after json_decode() with "true" argument. Here is the data I receive in the controller:

{
  "condition": "AND",
  "rules": [
    {
      "id": "diseases",
      "field": "mesh_id",
      "type": "string",
      "input": "select",
      "operator": "equal",
      "value": "C535575"
    }
  ],
  "valid": true
}

How can I access this value/type/fields from this data?

Udhav Sarvaiya
  • 9,380
  • 13
  • 53
  • 64
  • Can you print your Request Data and post here. – Hrishi Feb 19 '19 at 09:12
  • {condition: "AND", rules: Array(1), valid: true}condition: "AND" rules: Array(1)0:field: "mesh_id" id: "diseases" input: "select" operator: "equal" type: "string" value: "C535575" __proto__: Object length: 1 __proto__: Array(0) valid: true __proto__: Object – Sanathoi Gurumayum Feb 19 '19 at 10:10

0 Answers0