pubnub / eon-map

Realtime maps with PubNub and MapBox.
https://www.pubnub.com/developers/eon/
MIT License
135 stars 51 forks source link

Using JSON variable keys is confusing to new developers. #22

Open ianjennings opened 7 years ago

ianjennings commented 7 years ago

Many new developers are not familiar with the concept of dynamic keys:

var a = "key";
var data = {};
data[a] = true;
console.log(data.key);
// true

It would make sense to provide the option of:

{
    latlng: [1,2,],
    key: 'something'
}

As an option