Adding id to JSON.