webroo / dummy-json

Generates random dummy JSON data in Node.js
MIT License
380 stars 61 forks source link

Help / Feature request: Gender #22

Open mattdell opened 7 years ago

mattdell commented 7 years ago

Hello,

How could I best approach including gender in my mock data? Taking that a step further, how could I include mock data of male names and female names?

I see how I can mock data at a single level (e.g. - firstNames = ['Tom', 'Dick', 'Harry']) but I'd want to have more of an array of objects

people = [{ firstName: Tom, gender: male }, { firstName: Dick, gender: male }, { firstName: Harry, gender: male }, { firstName: Sally, gender: female }, ]

Then I could couple those names and genders together. Thoughts?