1Shubham7 / Wife-Predictor-v2

This is a fun project that predicts your wife. The web app has been deployed on Netlify.
https://wife-predictor.netlify.app/
MIT License
26 stars 27 forks source link

Alter database object to be an array #18

Closed theQuery closed 1 year ago

theQuery commented 1 year ago

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:

- const womendata = {
-     1: { id: 1, ...more },
-     2: { id: 2, ...more }
- };

+ const womendata = [
+     { id: 1, ...more },
+     { id: 2, ...more }
+ ];
1Shubham7 commented 1 year ago

fine. I am open to it! go ahead