Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getKey = function (data) {
- var firstKey;
- $.each(data, function (key, val) {
- firstKey = key;
- return false;
- });
- return firstKey;
- };
- function getKey(data) {
- for (var prop in data)
- return prop;
- }
- function getKey(data) {
- for (var prop in data)
- if (data.propertyIsEnumerable(prop))
- return prop;
- }
Add Comment
Please, Sign In to add comment