lib/helpers/simple_instance_setters.js
function findInstance(state, stateKey, instanceKey, payload) {
    return state[stateKey].find(obj => obj[instanceKey] === payload[instanceKey]);
}
function findInstance(state, stateKey, instanceKey, payload) {
    return state[stateKey].find(obj => obj[instanceKey] === payload[instanceKey]);
}
function findInstance ( state , stateKey , instanceKey , payload ) { return state [ stateKey ] . find ( obj => obj [ instanceKey ] === payload [ instanceKey ] ) ; }
helper function to find the correct instance
helper function to find the correct instance