title: How to get the style of an element in a JSON format?
body: <p>I am looking for a function that gives me the <code>JSON</code> of all the styles that are applied on the given element in <code>jquery</code></p>
  
  <p>I have tried <a href="https://stackoverflow.com/questions/754607/can-jquery-get-all-css-styles-associated-with-an-element">this</a>  but doesn't seem to work on <code>Firefox</code>
  Looking for a function that takes an element as an input and returns the <code>JSON</code></p>
  
  <p>Required out put is </p>
  
  <pre><code>{
  'sidebar' : {
      'background-color' : '#000000',
      'width' : 'auto',
  
  },
  'content-area' : {
   'color' : '#000000',
   'width' : '50%',
  }
  }
  </code></pre>