1.0.0 • Published 8 months ago

@themythicalcoder/json-to-formdata v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

Json-To-Form-Converter

This package allows you to convert the Jsondata to Formdata.

Docs!

Import the module and call the convertJSONToFormData function with the parameters.

Value : Json Data which needs to be converted.

Sample Code!

const convertfm = require("json-to-formdata")
const jsonData = {
    key1: 'value1',
    key2: 'value2',
    key3: 'value3',
  };
console.log(convertfm(jsonData));

Output

C:\Users\Desktop\Npm\Conversion>node script.js
FormData {
  [Symbol(state)]: [
    { name: 'key1', value: 'value1' },
    { name: 'key2', value: 'value2' },
    { name: 'key3', value: 'value3' }
  ]
}
1.0.0

8 months ago