store json response in variable
<pre><code>var response_data = jQuery.ajax({
    dataType: 'json',
    url: '/segments/'+ id + '/edit_user.json?context=' + context,
    type: 'POST',
    success: function(data){
      return data;
    }
  });
  if (response_data.warn_user == 'true'){
    return true 
  }else {
    warn_segment_edit('This field is presently being edited by ' + response_data.user_name + ' wait until editing is complete')
    return false 
  }
</code></pre>

<p>I'm getting This field is presently being edited by <strong>undefined</strong> wait until editing is complete</p>

<p>Is there any way to do it.</p>

<p>Thanks</p>
