Weighted Keyword Search with JavaScript

I previously wrote an article on how to build a search engine in javascript that allow the user filter contents on a table using the onKeyUp event Listener. The search process only determined if the needle string has a strict match in the haystack string.

more    0 likes

Displaying V-for Lists in Vue Components

I was building a number of templates for a huge application form, and had to break it down into smaller VueJS components. The process required a list of objects to be sent to a component as prop and listed in the template using v-for. This article covers how to properly list items from an object into a Vue Component.

more    0 likes

Building clean JSON strings that can be parsed in JavaScript

Certain tasks required dynamically building JSON strings that are then parsed, transmitted and used in other media of different languages. This is usually encountered when coding products using multi-language stacks for instance when building APIs.

Building and consuming JSON within JavaScript is very easy as the convention belongs to the scripting language and lot of extra delimiters, missing quotes are forgiven when parsing the string. JavaScript converts string to object using the parse() method and converts JSON objects to string using the method

// parse a string into JSON
  let jsonObject = JSON.parse(jsonString)

  // convert object to string
  let jsonString = JSON.stringify(jsonObject)

However, problems arise when it is required to construct JSON objects on a different medium other than JS and then transmit the string to JS. The aim of this article is to define a convention for constructing JSON string in any language that will be used in JavaScript.

more    0 likes