I believe the database object would be easier maintainable if it was an array instead of an object. That way the keys (numbers) wouldn't need to be added for each picture object added. It's also how it would be structured if it was fetched from a database. See example below:
I believe the database object would be easier maintainable if it was an array instead of an object. That way the keys (numbers) wouldn't need to be added for each picture object added. It's also how it would be structured if it was fetched from a database. See example below: