to json properly formats for tag input