detect if server sends belongsTo in an array and extract first value