Created
February 3, 2017 22:10
-
-
Save alettieri/1bac7d00347b0838882b25d290198d94 to your computer and use it in GitHub Desktop.
polymer-list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dom-module id="my-view1"> | |
<template> | |
<template is="dom-repeat" items="{{fixedList(hcValue)}}" as="item"> | |
<p>TEST:[[item.address_info.address]]</p> | |
<p>TEST:[[item.address_info.state]]</p> | |
<p>TEST:[[item.property_value.result.value.price_mean]]</p> | |
</template> | |
</template> | |
<script> | |
Polymer({ | |
is: 'my-view1', | |
ready: function() { | |
this.hcValue = [ | |
{ | |
"address_info": { | |
"address": "8691 Flowersong Cv", | |
"address_full": "8691 Flowersong Cv Boynton Beach FL 33473", | |
"city": "Boynton Beach", | |
"county_fips": "12099", | |
"geo_precision": "rooftop", | |
"lat": 26.51442, | |
"lng": -80.18437, | |
"state": "FL", | |
"unit": null, | |
"zipcode": "33473", | |
"zipcode_plus4": "4836" | |
}, | |
"property/value": { | |
"api_code": 0, | |
"api_code_description": "ok", | |
"result": { | |
"value": { | |
"fsd": 0.094695, | |
"price_lwr": 607246, | |
"price_mean": 670764, | |
"price_upr": 734282 | |
} | |
} | |
} | |
} | |
] | |
}, | |
fixedList: function(values) { | |
return values.map( function(value) { | |
value['property_value'] = value['property/value']; | |
return value; | |
}); | |
} | |
}); | |
</script> | |
</dom-module> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment