I want to iterate through a database and store the information as an array or object. I don't really care which as long as I can store and retrieve based on a key. I need guidence on the syntax to use to create and store data in javascript
// create storageEntity as array or objects
storageEntity = {};
storageEntity = [];
// on each retreival from data base store data in "storageEntity" // conceptually it should look like this:
storageEntity[recordIFromFile][recordType][dataType] = value
where:
- recordIFromFile - is an numeric value from file
- recordType - is a string from file
- dataType - is a string from file
- value - is a numeric value from the file