I just received a JSON object through a PHP get request and it has the following structure:
data == {"user_id":"7","emp_type_id":[{"0":"11","1":"10"}]}
My main focus right now is to retrieve the values within emp_type_id, which are "11" and "10" in this specific case.
While I have successfully accessed user_id by using data["user_id"], I am encountering difficulties in fetching the other values. I've attempted various methods such as:
eti=data["emp_type_id"];
var myVar = eti[0];
My goal is to ultimately iterate through all items in emp_type_id and store them in a JavaScript array.