javascript - Extract Variable from jQuery object -


i have single object returns following:
{left: "642px", top: "305px", opacity: "1"}

i trying break these out 3 separate variables: var left, var top, , var opacity

what simplest way go this?

use:

var data = {left: "642px", top: "305px", opacity: "1"}; var left = data.left,     top = data.top,     opacity = data.opacity; 

demo: http://jsfiddle.net/dxxuc/1/


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -