refactor stringmap functionality from json2csv into helper package