So I have the following JSON Object as an example:
 {
  "employees": {
    "employee300": {
      "number" : "example",
      "Name" : "example",
      "position" : 1
    },
    "employee456": {"number" : "example",
      "Name" : "example",
      "position" : 2},
    "employee120":{"number" : "example",
      "Name" : "example",
      "position" : 3}
}
}
I only have the position and I want to get the employee's id. For example, I have the position number that is 2 and I need to get the id that is "employee456".
I know there are a lot of key functions in PHP, but I would like to know how I can make my code work in my scenario. I can also convert the json to an array if there is a solution to it that way.
 
     
    