function convert -> from array to object notation

function convert -> hash table from array to object notation and java
script coalesce hack with ||