Here I have an array with object: (array can have N number of objects...)
[Object, Object]
0: Object
0: "2"
1: "Laza Lazic"
id_tabele: "2"
naziv: "Laza Lazic"
__proto__: Object
1: Object
0: "1"
1: "Pera Peric"
id_tabele: "1"
naziv: "Pera Peric"
__proto__: Object
length: 2
__proto__: Array[0]
How I can convert this array of object to this format with javascript (jquery):
[{"id":"1","ime_prezime":"Pera Peric"},{"id":"2","ime_prezime":"Laza Lazic"}]
so id_tabele from array object is id in json, and naziv is ime_prezime in json...