$res = array:3 [▼
  0 => array:18 [▼
    "id" => 1
    "smval" => "xys"
  ]
  1 => array:18 [▼
    "id" => 3
    "smval" => "asss"
  ]
  2 => array:18 [▼
    "id" => 4
    "smval" => "deg"
  ]
]
Expect result :
{first_id : 1, second_i d: 3, third_id : 4}
I want to convert this array to object. So I can call in ajax
{first_id : 1, second_i d: 3, third_id : 4}
 
     
     
    