Last active
February 17, 2021 04:26
-
-
Save baralogi/566b2ff6d632cdebd986755741a126f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let str = "ENROLL_FP PIN=4832 FID=0 RETRY=3 OVERWRITE=1"; | |
let res = str.replace("ENROLL_FP ", ""); | |
let splitX = res.split("\t") | |
let values = splitX | |
let newObject = {} | |
let data = values.forEach((item, index) => { | |
let array = item.split("=") | |
let keyX= array[0].toLowerCase(); | |
let valueX= array[1]; | |
newObject[keyX] = valueX; | |
}) | |
console.log(newObject) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment