Skip to content
sneppets

sneppets

  • Privacy
search string in jsonb postgreSQL

How to search a specific string in JSON or JSONB array in PostgreSQL ?

August 1, 2024August 1, 2024 Editorial StaffLeave a Comment on How to search a specific string in JSON or JSONB array in PostgreSQL ?

I have a column called meta_data whose data type is JSONB data type which deals with JSON array. And let’s say you wanted to find rows that contains the string “deviceid” in the meta_data column (JSONB data type) in audit… Read More!

database json, jsonb, postgres, sql
display json object using ngfor directive angular

How to display JSON object using ngFor directive : Angular 9

August 23, 2020August 24, 2020 Editorial StaffLeave a Comment on How to display JSON object using ngFor directive : Angular 9

This tutorial guides you on how to display JSON object using ngFor directive in Angular 9. In this tutorial example let’s see how to use JSON response from REST API and display data in the component’s template.

Angular angular, directive, json, json-array, json-object, ngFor
sneppets-java8

Error: Expected BEGIN_OBJECT but was STRING at line 1 column 1

February 12, 2020February 12, 2020 Editorial Staff4 Comments on Error: Expected BEGIN_OBJECT but was STRING at line 1 column 1

Are you getting error “Expected BEGIN_OBJECT but was STRING at line 1 column 1” while parsing Json String to Json Object using Google gson library ?

Java gson, java, json

Check if key exists in jsonobject before fetching value for that key ?

November 12, 2019November 14, 2019 Editorial StaffLeave a Comment on Check if key exists in jsonobject before fetching value for that key ?

When you deal with json object you may want to check whether key exists in the jsonobject before fetching value for that key. We can easily check using Google gson JsonObject has() method. has() method – Class JsonObject This is… Read More!

Java gson, json
Copyright © 2018 Sneppets. All Rights Reserved