When I run the script it doesn’t log??
No error though, just an empty console.
Sorry if it’s easy I’m pretty new.
const config = require("./config.json");
var enabled = config.enabled;
let json = { "name": "micheal", "age": 28 };
while (enabled) {
try {
let jsonStringed = JSON.stringify(json);
var currentSelection = config.string;
let string_ea = currentSelection;
var matchedString = jsonStringed.match(string_ea)
let count = 0;
matchedString.forEach(element => {
if (element == string_ea) {
count += 1;
}
if (count = 0) {
console.log(`"${string_ea}" never occured.`);
}
if (count > 0) {
console.log(`"${string_ea}" occured ${count} times.`);
}
})
} catch (e) {
console.log(e);
}
}
more text so i can post it without adding more details asjldkasd asd as d sa da sd asdasdasdasdasdasdasd