0

I am new to JSON and jQuery and am building an AJAX REST API Application.

I need to know how to pull a specific key and its corresponding value from a JSON Array I am getting back from an AJAX POST call.

JSON Array is as below:

[
  {
    "empID": 7,
    "deptID": 578,
    "batchID": 38409650,
    "recordID": 1
  }
]

Pls help, thanks.

3
  • What is your desired output? Are you trying to access a property of an object in the array or are you trying to find the object with a given property? Commented Feb 6, 2018 at 20:02
  • Thanks for responding ... My desired output is I want to have a line of code .... var batchValue..... and get the value 38409650 into this ---> var batchvalue ... Commented Feb 6, 2018 at 20:08
  • @Musa, this question isnt a Duplicate. I checked the link given above. That question talks about array, not JSON array. I tried all that, didnt work. Thanks. Commented Feb 6, 2018 at 20:20

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.