function valueToItems(availableItems, selectedValue) {
  var arrayAssertion = (0, _utils.createArrayAssertion)(selectedValue);
  return (0, _array.arrayMap)(availableItems, function (item) {
    item.checked = arrayAssertion(item.value);
    return item;
  });
}
Pick up object items based on selected values.

@param {Array} availableItems Base collection to compare values.
@param selectedValue Flat array with selected values.
@returns {Array}