What do I do can change the variable array two dimensions as object. I write with Angularjs
[Object, Object, Object]
  0:Object
    Amount :12
    categoryID:"1"
    typeID:"1"
    typeName:"chicken"
  1:Object
    Amount :23
    categoryID:"1"
    typeID:"4"
    typeName:"Bird"
  2:Object
    Amount :12
    categoryID:"1"
    typeID:"5"
    typeName:"swan"
To:
{    
    0:{
        Amount :12
        categoryID:"1"
        typeID:"1"
        typeName:"chicken"
      }
    1:{
        Amount :23
        categoryID:"1"
        typeID:"4"
        typeName:"Bird"
      }
    2:{
        Amount :12
        categoryID:"1"
        typeID:"5"
        typeName:"swan"
      }
}
I want to use it to send data json_encode. Help me with a solution.