Nested-FormData
is a Function designed to handle nested form data structures in a simplified and efficient way. It helps in managing complex form data, making it easier to work with forms that require hierarchical data.
- Nested Form Data Handling: Easily manage and manipulate nested form data.
- Flat and Hierarchical Data Structures: Convert between flat and nested data structures seamlessly.
- Validation Support: Integrate with validation libraries to ensure data integrity.
- Customizable: Tailor the library to meet specific needs of your form data structures.
You can Clone the function via:
git clone https://github.com/KerlosSoNy/Nested-FormData.git
Basic Usage
Here's a simple example
import { appendToFormData } from "./AppendFormData";
const nestedData = {
user: {
name: 'John Doe',
address: {
street: '123 Main St',
city: 'Anytown',
},
},
};
let formData = new FormData();
// Convert nested data to FormData
formData = appendToFormData(formData, nestedData);
If you'd like to contribute to this project, please follow these steps:
-
Fork the repository.
-
Create a new branch for your feature or bugfix.
-
Make your changes and commit them.
-
Push your branch and open a pull request.
TypeScript , DataStructure