Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-csvto-json

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-csvto-json

Angular Library to convert CSV to JSON array.

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
149
decreased by-15.34%
Maintainers
1
Weekly downloads
 
Created
Source

CSVtoJSONLibrary

This project was generated with Angular CLI version 10.0.5.

CSV Format => JSON Format

Stackblitz Demo

Step - 1

npm i ngx-csvto-json --save
NPM Package Link

import NgxCSVtoJSONModule in app.module.ts file.
app.module.ts

import {NgxCSVtoJSONModule} from 'ngx-csvto-json';
 imports: [
    NgxCSVtoJSONModule
  ]

Step - 2

Use selector "Ngx-CSVtoJSON" to use the converter component
Note: This component can emit two events "onConvert" and "onFail"
Bind those event in app.component.ts file with user defined functions and process the result
app.component.ts

convert(objArray){
  console.log(objArray);
 }
 onError(err){
   console.log(err);
 }

app.component.html

<Ngx-CSVtoJSON (onConvert)="convert($event)" (onFail)="onError($event)"></Ngx-CSVtoJSON>

CONVERTED RESULT FORMAT

Result format will be in

finalobj= {
 properties: [],
 result: []
};

That's it you are good to go. Happy Coding :)

Keywords

FAQs

Package last updated on 06 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc