title: Ember.JS do an operation every time the JSON is loaded
body: <p>I am new to Ember and in my APP I need to add some operations depending on the JSON I get from the server.</p>
  
  <p>This is currently my logic:</p>
  
  <p>In the component.js</p>
  
  <pre><code>var foo = [];
  
  didInsertElement() {
    var data  = this.get('content');
    //then I do some transformations with data to obtain what I want and assign it to foo
  
    data.forEach(function(option) {
      list.push( JSON.parse(JSON.stringify(option)))
    })
  
    for(i = 0; i &lt; list.length; i++) {
      //some logic code with list
    }
  
    this.set('foo', someTransformationFromList);
  
  
    for (i = 0; i &lt; count; i++) {
      this.get('content').push(jQuery.extend(true, {}, this.get('content')[0]));
    }
  
    for(i = 0; i &lt; foo.length; i++) {
      this.get('content')[i].set('string1', foo[i].text);            
      this.get('content')[i].set('id', foo[i].value);
    }
  }
  </code></pre>
  
  <p>So now the question is, I need to move this logic from didInsertElement to somewhere else so it gets executed every time I get my JSON no just the first time when the component is rendered.  I have tried to use a serializer or a transform but I don't know if I can use any of them. Can you please give me any pointers about how to do this task?.</p>
  
  <p>Thank you.</p>