First you create an array ( []), and then assign properties to it using non-numeric keys ( player). This is technically possible (as in the case of an error), but not for any arrays.
You should use objects ( {}) instead . Also ["player"]matched with .player.
var obj = {};
obj.entities = {};
obj.entities.player = [];
obj.entities.player[0] = {};
obj.entities.player[0].pos = "0,0";
Objects can accept any property key. Arrays are a subset of objects that should only have indexes (numbers >= 0).