Node.js text file parser to json file

I need you to write a parser that finds all devices starting with AP <id> ie

ap 58

description N2PEDI901-1

building NCHPO

floor N2

led Normal

location N2TECH001


then extract the fields: description, location and floor and store this information BY FLOOR NAME in json formatted file. For example


"floors": [

{"floorName": "floor1",

"APs": [{"apID":"58", "description": "my description", "location":"MyLocation" },

{"apID":"59", "description": "my description", "location":"MyLocation"},

{"apID":"60", "description": "my description", "location":"MyLocation"}]},

{"floorName": "floor2",

"APs": [{"apID":"60", "description": "my description", "location":"MyLocation"}]}



If the device AP don't have the information FLOOR then they will be added to a "noFloor" json

I have attached a sample of the the file with many devices there so you can test. I will use this file to test and validate your work

Let me know if you have any question

Taidot: Javascript, node.js

Näytä lisää: node file parser, node write json file, use of node.js, test js, sample test question, need js file, json, json c, javascript nodejs, aps, parser json, node javascript, write text attached, JavaScript JSOn, question text, json sample, floors building, json example, json parser example, JSON Parser

Tietoa työnantajasta:
( 90 arvostelua ) Paris, France

Projektin tunnus: #5321056