Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var TryGetPropertyValue = function (o, propertyName1, ifundefined) {
- var names = propertyName1.split(/[\s.]+/);
- while (o && names.length) {
- o = o[names.shift()];
- }
- if (names.length === 0) {
- return ((typeof o === 'undefined') && (typeof ifundefined !== 'undefined')) ? ifundefined : o;
- }
- };
- //var dictionary = TryGetPropertyValue(JSON.parse(data.dictionary()), 'MyPage', {});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement