import { isEmpty } from 'lodash' export const extractValue = (set, key) => { const find = set.find((s) => s.key === key) if (isEmpty(find) === false) { if (find.type === 'image') { return find?.url } return find?.value } return '' }