• Artem Artemenko 9
  • NEWBIE
  • 25 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hi. I return custom object to js by callback, then take it in aura component like ​​​​​.
<aura:attribute name="customObj" type="customObj__c[]"/>
Also i have list of custom fields in this object (endless) 
<aura:attribute name="listObjKeys" type="String" default='["Field1__c","Field2__c","Field3__c","Field1__c","Date__c"]'/>
How i can iterate through my object to display values by field. I try this, but with no result 
<aura:iteration items="{!v.customObj}" var="co">
  <aura:iteration items="{!v.listObjKeys}" var="keys">
    <tr>{!keys}</tr>
  </aura:iteration>
</aura:iteration>
Hi, I`m junior in apex, I took data from static resource, then i want to get data by key from this String, but i dont know how.
//Get static resource            
StaticResource sr = [SELECT Id, Body FROM StaticResource WHERE Name = 'GetCityResource' LIMIT 1];
            String body = sr.Body.toString();
//here i want to take name value
{"coord":{"lon":27.57,"lat":53.9},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"base":"stations","main":{"temp":20,"feels_like":19.51,"temp_min":20,"temp_max":20,"pressure":1013,"humidity":82},"visibility":10000,"wind":{"speed":4,"deg":50},"clouds":{"all":75},"dt":1592830206,"sys":{"type":1,"id":8939,"country":"USA","sunrise":1592789886,"sunset":1592851521},"timezone":10800,"id":625144,"name":"Atlanta","cod":200}

 
Hi, I`m junior in apex, I took data from static resource, then i want to get data by key from this String, but i dont know how.
//Get static resource            
StaticResource sr = [SELECT Id, Body FROM StaticResource WHERE Name = 'GetCityResource' LIMIT 1];
            String body = sr.Body.toString();
//here i want to take name value
{"coord":{"lon":27.57,"lat":53.9},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"base":"stations","main":{"temp":20,"feels_like":19.51,"temp_min":20,"temp_max":20,"pressure":1013,"humidity":82},"visibility":10000,"wind":{"speed":4,"deg":50},"clouds":{"all":75},"dt":1592830206,"sys":{"type":1,"id":8939,"country":"USA","sunrise":1592789886,"sunset":1592851521},"timezone":10800,"id":625144,"name":"Atlanta","cod":200}