Every line of 'jquery get value from array of objects' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
21 function getObjectValue(obj){ 22 var prefixed_prop_name = obj.attributes["prop_name"].value; 23 var button = $(obj).closest("button"); 24 var pointer = prefixed_prop_name.indexOf("_", 1) + 1; 25 var prop_name = prefixed_prop_name.substring(pointer); 26 var obj_value = "("; 27 28 29 button.find("input[type="+obj.type+"][prop_name$='"+prop_name+"']").each(function () { 30 obj_value += this.value + ","; 31 }); 32 obj_value = obj_value.substring(0, obj_value.length - 1); 33 obj_value += ")"; 34 return [obj_value, prop_name] 35 }
122 function getValue(value) { 123 var webApiEndpoint = setApiEndpoint('get_value') 124 125 $.ajax({ 126 url: webApiEndpoint+"/"+value, 127 type: 'GET', 128 dataType: 'text', 129 cache: false, 130 }).done(function(data){ 131 if (data.match(/^null$/)) { 132 $('.get-result').text("No data: "+value+ " don't have value."); 133 } else { 134 $('.get-result').text("Value: "+data); 135 } 136 137 }).fail(function(){ 138 alert("fail to access Gladiator Web API"); 139 }); 140 }
99 function getValue(sSelector, callback) { 100 client.getValue(sSelector, function (err, value) { 101 if (err) { callback(err); } 102 else { 103 callback(null, value); 104 } 105 }); 106 }
18 function getValueFromObject(element) { 19 return (element.choices && 20 element.choices.length > 0 && 21 element.choices[0] !== '' && 22 element.choices[0] !== optionInputOther.OTHER) || 23 (element.other && element.choices[0] === optionInputOther.OTHER) 24 ? element 25 : undefined; 26 }
11 export function removeArray(array, val, callback) { 12 var index = array.indexOf(val); 13 //如果找到 14 if (index > -1) { 15 callback && callback() 16 array.splice(index, 1); 17 } 18 }
51 getValue(obj: any) { 52 const realObj = this.isStatic ? this.cls.typeObj : obj; 53 return realObj[this.name]; 54 }
333 export function setValue(object, value) { 334 if (object && object.isStream) { 335 object.setValue(value); 336 } 337 }
16 function getValue (value, key) { 17 if (!value) return value 18 if (value instanceof Map) { 19 return value.get(key) 20 } 21 if (value instanceof Set) { 22 return key 23 } 24 return value[key] 25 }
1810 function makeArray(value) { 1811 if ((typeof(value) === 'object') && (typeof(value.length) === 'number')) { 1812 return value; 1813 } 1814 if (typeof(value) !== 'undefined') { 1815 return [value]; 1816 } 1817 return []; 1818 }
1 export function makeArray(value) { 2 return Array.isArray(value) ? value : value ? [value] : []; 3 }