If someone is interested, I have achieved this through changing the JSON data. By default id value is saved into database.
Before
[{"name":"user1", "id":0},{"name":"user2", "id":1}...]
After
[{"name":"user1", "id":"user1"},{"name":"user2", "id":"user2"}...]