Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc.
The_.unescape() method is used to convert HTML entities like &, <, >, " and ‘ in the given string to their corresponding characters.
Syntax:
_.unescape( string )
Parameters: This method accepts a single parameter as mentioned above and described below:
- string: It is the string to be used for unescaped.
Return Value: This method returns the unescaped string.
Example 1:
Javascript
// Defining Lodash variable const _ = require('lodash'); // The string to unescape var str = "fit & fine"; // Using _.unescape() method console.log(_.unescape(str)); |
Output:
fit & fine
Example 2:
Javascript
// Defining Lodash variable const _ = require('lodash'); // The string to unescape var str = ""Heyy""; // Using _.unescape() method console.log(_.unescape(str)); |
Output:
"Heyy"

… [Trackback]
[…] Here you will find 34554 more Info on that Topic: geeksforgeeks.org/lodash-unescape-method-2/ […]
… [Trackback]
[…] Here you can find 11266 additional Info to that Topic: geeksforgeeks.org/lodash-unescape-method-2/ […]
… [Trackback]
[…] There you will find 41178 more Info to that Topic: geeksforgeeks.org/lodash-unescape-method-2/ […]
… [Trackback]
[…] Here you can find 27719 more Information to that Topic: geeksforgeeks.org/lodash-unescape-method-2/ […]