index.js
function getIncluded(payload, type, id) {
  for (var i = payload.included.length - 1; i >= 0; i--) {
    if (payload.included[i].id === id && payload.included[i].type === type) {
      return payload.included[i];
    }
  }
}
function getIncluded(payload, type, id) {
  for (var i = payload.included.length - 1; i >= 0; i--) {
    if (payload.included[i].id === id && payload.included[i].type === type) {
      return payload.included[i];
    }
  }
}
function getIncluded ( payload , type , id ) { for ( var i = payload . included . length - 1 ; i >= 0 ; i -- ) { if ( payload . included [ i ] . id === id && payload . included [ i ] . type === type ) { return payload . included [ i ] ; } } }
Fetches an included object from a payload by its id

@param {Object} payload
The payload encapsulating the included data
@param {String} type
The entity type to retrieve
@param {String} id
The id of the desired included data

@return {Object}
The found included data
Fetches an included object from a payload by its id