let obj={
    name:'xiaoming'.age:20.address:'China'
}
Copy the code

Qs. After the transformation of the parse

qs.parse(obj)
// Output: {name: "ABC ", age: 20, address:" China "}
Copy the code

Compare obj and qs.parse for consistency and use lodash’s isEqual

_.isEqual(obj,qs.parse(obj))
// Output: true
Copy the code

Conclusion: Qs.parse transforms the object to the same value as the original object

Qs. Stringify after conversion

qs.stringify(obj)
// Output: name=abc&age=20&address=%E4%B8%AD%E5%9B%BD
Copy the code

Qs. Parse (qs) stringify (obj)) after conversion

qs.parse(qs.stringify(obj))
// Output: {name: "ABC ", age: "20", address:" China "}
Copy the code

At this point we should see the difference, the age value is changed to a string, the original object is different