How to Sort Arrays of Objects in TypeScript

typescript sort array of objects

Recently, I was working on a project where I needed to sort an array of customer objects by different properties like name, purchase date, and total spending. As a TypeScript developer, I’ve found that the built-in Array.sort() method is very useful, but it requires some TypeScript-specific knowledge to use correctly with complex object arrays. In … read more…

How to Write to a File in a PowerShell Loop (5 Efficient Methods)

powershell write to file in loop

When working with PowerShell automation, I often need to process data in loops and write the results to files. This is a common requirement when generating reports, logging application activities, or processing batches of data. Over my years of PowerShell experience, I’ve discovered several effective approaches to writing data to files within loops. In this … read more…

TypeScript keyof with Strings: Complete Guide with Examples

typescript keyof string

Recently, I was working on a TypeScript project where I needed to enforce type safety when accessing object properties. The challenge was to restrict access only to existing property keys of an object. That’s when I discovered the power of the keyof operator with string types. In this article, I’ll share my experience using TypeScript’s … read more…

How to Compare Dates in TypeScript

typescript compare dates

When I first started using TypeScript, comparing dates felt confusing. I assumed I could just use == or === like I do with numbers or strings—but that didn’t work as expected. In TypeScript (and JavaScript), dates are objects. So, if you compare two date objects directly, you’re actually comparing their references, not their values. To … read more…

PowerShell Execution Policy: A Comprehensive Guide

powershell set execution policy

Have you encountered an error “execution of scripts is disabled on this system” while trying to run a PowerShell script? I am sure you must have at least at the beginning. This is because of PowerShell’s execution policy settings. In this article, I will walk you through everything you need to know about PowerShell execution … read more…

Working with Multiline Strings in TypeScript

typescript multiline string

Working with multiline strings is a common occurrence in my TypeScript projects. Whether I’m creating HTML templates, SQL queries, or formatted text outputs, handling text that spans multiple lines is essential. In the past, concatenating strings with the + operator or using arrays with join() were common workarounds. But TypeScript, following JavaScript’s evolution, now offers … read more…

How to Use TypeScript Enum Reverse Mapping

typescript enum reverse mapping

Recently, I was working on a TypeScript project where I needed to convert numeric values back to their corresponding enum names. This is when I researched and found out enum reverse mapping feature. While most developers know how to get enum values from keys, going the other way around isn’t as widely understood. In this … read more…

Add Property to Object in TypeScript

typescript add property to object

Are you working with TypeScript objects? Then you may be required to add properties to objects. There are various methods to do so. In this tutorial, I’ll show you several ways to add properties to TypeScript objects, from basic approaches to more advanced techniques for special cases. Let’s dive in! TypeScript Objects and Properties TypeScript … read more…

How to Compare Strings in TypeScript

Compare Strings in TypeScript

When working with TypeScript applications, I find myself comparing strings almost daily. A few examples of when I was comparing strings include sorting arrays, validating user input, or checking conditions in my code. What seems like a simple operation actually has several nuances that can trip up even experienced developers. In this article, I’ll walk … read more…

How to Write to File without Carriage Return in PowerShell

"More text added" | Out-File -FilePath C:\Bijay\output.txt -Append -NoNewline

Recently, I was working on a PowerShell script that needed to output data to a file in a very specific format. The challenge was that I needed to write content to a file without adding carriage returns (line breaks) at the end of each line. This can be particularly important when you’re generating configuration files, … read more…

Check If A User Is Part Of An Office 365 Group In Power Apps

Check If Current Logged In User Is Part Of An Office 365 Group In PowerApps

When developing the Power Apps canvas application, you may occasionally need to verify whether the user belongs to a specific Microsoft 365 group. For example, suppose you want to enable or disable an action or Power Apps button based on the user’s group membership. In that case, we primarily need to check if the current … read more…

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial

FREE Power Platform Tutorial PDF

Download 135+ Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…