in JMVC3.3/canJS attributes set by attr() are no longer simple objects, but can.Observe objects. Whenever I try to use these data in an ajax request buildParams fails.
example:
So my question is: How can I get a plain object again from an observable?
example:
- var params = can.Observe( {
- extent : {
- east: 5.9700203118605,
- north: 52.211401605631,
- south: 52.211118448568,
- north: 5.9684737677777
- }
- });
- $.ajax( {
- type: 'GET',
- url: 'http://bag.dotkadata.com/Bag/Extent',
- data: params,
- dataType: 'json'
- }).done( function( result ) {
- console.log( result );
- });
So my question is: How can I get a plain object again from an observable?