[Text] A named Object is harder to offset than an Index in an Array

As a christian mother of 5, this doesn't make any sense.

Its harder to find the person in case 1 because not only do you need their name but you also need their index in the citizens array.

Also in both cases a unique identifier such as user id instead of index should be used as the key (what happens if I add or remove users? Also its easier to ask for someone's user id rather than their physical position in an array)

And the array should probably be an object keyed by the unique identifier so we don't need to iterate over 10,000 users to find the correct one.

'citizen' needs to be named better, its ambiguous as what it actually is (is it a flag indicating citizenship? does it contain citizenship data such as SSN?}

final result:

users: {

 uuid1 : {
firstName:'Jane',
actualOfficialNameEverywhereElseInTheDatabase : 'Jennifer Smith,
isCitizen : true
 },
 uuid2 : {
firstName:'Jane',
actualOfficialNameEverywhereElseInTheDatabase : 'Jennifer Singlemother Smith'
isCitizen : true
 },
...
/r/GetMotivated Thread