how to create dynamic json?
function createJSON() {
jsonObj = [];
$("input[class=email]").each(function() {
var id = $(this).attr("title");
var email = $(this).val();
item = {}
item ["title"] = id;
item ["email"] = email;
jsonObj.push(item);
});
console.log(jsonObj);
}
Also in JavaScript:
- javascript remove final newline from string
- javascript add items to array
- schema mongoose
- $(...).DataTable is not a function
- mometjs
- javascript for loop return index
- reverse words in a string javascript
- js match true false
- how to access the second class of an element javascript
- how to set markers in d3.js map projection
- meme discord.js
- how to paste in input field react native
- jshint es6 vscode
- post request using vue.js github repo
- how to install node js in ubuntu
- stop a setinterval
- Levenshtein Distance algorithm javascript
- jquery get element width
- clear session storage on refresh
- react and bootstrap
- react native init project
- javascript randomly shuffle array
- How to check if a member has a role discord.js
- loop in javascript