Programming Tips - javaScript: log a FormData object

Date: 2022jul20 Language: javaScript Q. javaScript: log a FormData object A. Use JSON.stringify(Object.fromEntries(formdata.entries())) For example:
const formdata = new FormData(event.target); formdata.append('userid', 'jeff'); formdata.append('password', 'amazon'); console.log('formdata=' + JSON.stringify(Object.fromEntries(formdata.entries())));