Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion #2

Open
mcoolin opened this issue Sep 14, 2011 · 0 comments
Open

Suggestion #2

mcoolin opened this issue Sep 14, 2011 · 0 comments

Comments

@mcoolin
Copy link

mcoolin commented Sep 14, 2011

Love this library its very handy. Thanks for creating it!

One suggestion is a means to use all the values in an array, basically a foreach.

It would be handy to populate dropdown lists, where random values don't make to much sense.

e.g.
$.mockJSON.data.EMAILTYPES = ['Work', 'Travel', 'Mobile', 'Hotmail', 'Gmail', 'Emergency', 'Home'];

$.mockJSON(/getData:en/emailtypes/, {
"data|each EMAILTYPES": [
{
"id|+1": 0,
"lang": "en",
"text": "@EMAILTYPES",
"value|+1": 0
}
],
"status": {
"err": 0,
"msg": ""
}
}
);

biegel pushed a commit to biegel/mockJSON that referenced this issue Feb 28, 2013
added QUERY_STRING_ key and fixed line breaks to Unix style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant