+ 1

how can I make a file extractor in javascript?

guys I have a task to make a file extractor. it gets text file and converts its data to js object how should I write the code?

22nd Mar 2020, 10:43 PM
Amir Yeganeh
Amir Yeganeh - avatar
5 Respostas
+ 3
Amir Yeganeh you asked about alternatives to json here is a short list: https://stackshare.io/json/alternatives
23rd Mar 2020, 10:46 PM
BroFar
BroFar - avatar
23rd Mar 2020, 12:57 AM
BroFar
BroFar - avatar
+ 1
BroFar yeah that's so similar to my task but is there a way doing it without using json?
23rd Mar 2020, 8:10 AM
Amir Yeganeh
Amir Yeganeh - avatar
+ 1
BroFar We need a nodejs app in order to extract some data from a text file and create a javascript object from the data. 1. The file is a data structure as bellow: ............................ ` //data.txt Name: amir Family: yeg Address: City: Tehran Country: Iran Contact: Phone: 09000900 Email: example@gmail.com ` so the object should look like this after processing. ` data = { Name: amir, Family: yeg, Address: { City: Tehran, .... Contacts: { Phone: 09000900, Email: example@gmail.com } } } ` this is what I want
23rd Mar 2020, 8:13 AM
Amir Yeganeh
Amir Yeganeh - avatar
+ 1
BroFar thanks👍👋
23rd Mar 2020, 10:59 PM
Amir Yeganeh
Amir Yeganeh - avatar