Is it possible to retrieve a web template (not a site template) in SharePoint Online?

A web template is persisted in the SharePoint database as a Microsoft SharePoint Foundation Solution, which is a file that has a .wsp extension. The .wsp file is stored in the Solutions Gallery of the site collection. The solution can also be deployed as a sandboxed solution.

Users create web templates on the Save as Template page (or through code that uses the SaveAsTemplate method of the Microsoft.SharePoint.SPWeb class).

Source: Web Templates

Issue: Unfortunately, the SaveAsTemplate method is not available in SharePoint Online.

Solution:

In SharePoint Online, you can use Get-PnPProvisioningTemplate using PnP PowerShell to generate a provisioning site template from a web.

References:

  1. Get-PnPProvisioningTemplate
  2. Introducing the PnP provisioning engine

blockchain – How to retrieve all addresses with non-zero balance and their balances?

You can use btcposbal2csv.py script to export the list to CSV.

To get current addresses with positive balance, let the full node client sync with the network. Stop the bitcoin-core client before running this utility. If you not stop the client, the database might get corrupted.

Then run this program with path to chainstate directory (usually $HOME/.bitcoin/chainstate).

For example, the following will read from ~/.bitcoin/chainstate, and write result to ~/addresses_with_balance.csv:

./btcposbal2csv.py /home/USER/.bitcoin/chainstate /home/USER/addresses_with_balance.csv

Notes:

  • That the output may not be complete as there are some transactions which are not understood by the decoding lib, or that which do not have “address” at all. Such transactions are not processed. Number of them and the total ammount is displayed after the analysis.
  • The output csv file only reflects the chainstate leveldb at your disk. So it will always be few blocks behind the network as you need to stop the bitcoin-core client.

How to retrieve data using REST from another Custom List View in SharePoint and return it to Datatable?

  • You should do the changes in the REST URL such as sort, filter as you
    did in the “CreatedToday” view and it will return data accordingly.
  • The data that is returned by REST always depends on the REST URL, so
    modify it accordingly based on your requirement.

Update:

The following example demonstrates how to retrieve list items for a View using SharePoint REST:

function getListItems(webUrl,listTitle, queryText) 
{
    var viewXml = '<View><Query>' + queryText + '</Query></View>';
    var url = webUrl + "/_api/web/lists/getbytitle('" + listTitle + "')/getitems"; 
    var queryPayload = {  
               'query' : {
                      '__metadata': { 'type': 'SP.CamlQuery' }, 
                      'ViewXml' : viewXml  
               }
    };
    return executeJson(url,"POST",null,queryPayload);
}


function getListViewItems(webUrl,listTitle,viewTitle)
{
     var url = webUrl + "/_api/web/lists/getByTitle('" + listTitle + "')/Views/getbytitle('" + viewTitle + "')/ViewQuery";
     return executeJson(url).then(
         function(data){         
             var viewQuery = data.d.ViewQuery;
             return getListItems(webUrl,listTitle,viewQuery); 
         });
}

where:

function executeJson(url,method,headers,payload) 
{
    method = method || 'GET';
    headers = headers || {};
    headers("Accept") = "application/json;odata=verbose";
    if(method == "POST") {
        headers("X-RequestDigest") = $("#__REQUESTDIGEST").val();
    }      
    var ajaxOptions = 
    {       
       url: url,   
       type: method,  
       contentType: "application/json;odata=verbose",
       headers: headers
    };
    if (typeof payload != 'undefined') {
      ajaxOptions.data = JSON.stringify(payload);
    }  
    return $.ajax(ajaxOptions);
}

Usage:

getListViewItems(_spPageContextInfo.webAbsoluteUrl,'Tasks','All Tasks')
.done(function(data)
{
     var items = data.d.results;
     for(var i = 0; i < items.length;i++) {
         console.log(items(i).Title);
     }    
})
.fail(
function(error){
    console.log(JSON.stringify(error));
});

How to get all items in a view using REST API

sql server – SQL Trigger fails retrieve new record in second query

Any advice on this will be appreciated
This script created a table with new records.

My script is failing to assign the “Inserted” ID to the query but manually assigning a value works
(a) Tried Cast both side of the Where Clause to int
(b) Moved this section within the second BEGIN -END section

@MAIL_BODY = @MAIL_BODY +
    '<tr>' +
    '<td>' + @OrderID + '</td>' +
    '<td>' + @Description + '</td>' +
    '<td>' + @DiscountedPrice + '</td>' +
    '</tr>' FROM (dbo).(OrderItem) it INNER JOIN (dbo).(Product) pt on pt.ProductID=it.ProductID WHERE it.OrderID = @OrderID``

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER (dbo).(EMAILFINAL)
ON (dbo).(Order)
AFTER INSERT
AS

BEGIN
DECLARE @OrderID VARCHAR(3),
@inpToEmail VARCHAR(MAX),
@Description VARCHAR(MAX),
@DiscountedPrice VARCHAR(MAX),
@MAIL_BODY VARCHAR(MAX)

SELECT @OrderID = i.OrderID FROM inserted i;
IF (@OrderID IS NOT NULL)

SELECT @inpToEmail=dr.DistributorEmail from (dbo).(Distributor) dr
inner join (dbo).(User) Ur on ur.DistributorID=dr.DistributorID
inner join (dbo).(Order) odr on odr.UserID=Ur.UserID
where odr.OrderID= + @OrderID;

PRINT @inpToEmail

SET @MAIL_BODY = ” +

OrderID
Feature
Cost($)

SELECT
@MAIL_BODY = @MAIL_BODY +
” +
” + CAST((OrderID) AS VARCHAR(11)) + ” +
” + CAST((ProductName) AS VARCHAR(50)) + ” +
” + CAST((DiscountedPrice) AS VARCHAR(11)) + ” +

FROM (dbo).(Order_Product)
where Orderid = @OrderID

BEGIN
SET NOCOUNT ON;

declare
@HtmlHeader nvarchar(500),
@body nvarchar(max),
@inpEmailProfiler VARCHAR(50) =’Notifications’,
@inpBodyFormat VARCHAR(5) =’HTML’,
@inpSubjectLine NVARCHAR(MAX)=’Quotation’

SELECT

@MAIL_BODY = @MAIL_BODY +
” +
” + @OrderID + ” +
” + @Description + ” +
” + @DiscountedPrice + ” +

FROM (dbo).(OrderItem) it
INNER JOIN (dbo).(Product) pt on pt.ProductID=it.ProductID
WHERE it.OrderID = @OrderID

SELECT @MAIL_BODY = @MAIL_BODY + ” +

‘ + ‘
‘ + ‘
‘ + ‘
‘ + ‘Kind regards,’ +

‘ + ‘Kvikna ehf.’

EXEC msdb.dbo.sp_send_dbmail
@profile_name = @inpEmailProfiler,
@recipients = @inpToEmail,
@body_format=’HTML’,
@body = @MAIL_BODY,
@subject = @inpSubjectLine;

END
END

2013 – Javascript : Retrieve an item value from SP List

Before explaining my problem, I give you the context.

I’ve made an first page that will display a “Marquee” message (message that will scroll horizontally).

I would like to make possible to edit the “Marquee message” from an another page.
So, I’ve created an other page with a textarea and a button.
When I write a text and click on the button, an item is created in a list called “MarqueeList”.

That list contain only the last message that we create : my script delete all the items before add a new one.

My problem is that I would to get that message item, using a script from the page that contain the marquee, and store it into a variable.

I’ve tried many and any script, but it doesn’t work.

If someone could help me, or advise me to the good way?

Thanks a lot

segregated witness – Retrieve address when create a channel lightning network

I have two nodes in regtest.
the first one is:

$ l1-cli getinfo
{
   "id": "02c3f99e70c8da59e428dd119d36c0a1317e5cd85218a760355b5f9b4f822f6109",
   "alias": "ALICE",
   "color": "ddff06",
   "num_peers": 0,
   "num_pending_channels": 0,
   "num_active_channels": 0,
   "num_inactive_channels": 0,
   "address": [],
   "binding": [
      {
         "type": "ipv4",
         "address": "127.0.0.1",
         "port": 6060
      }
   ],
   "version": "v0.8.2-269-g6014644",
   "blockheight": 1,
   "network": "regtest",
   "msatoshi_fees_collected": 0,
   "fees_collected_msat": "0msat",
   "lightning-dir": "/tmp/l1-regtest/regtest"
}
$ l1-cli  dev-listaddrs
{
   "addresses": [
      {
         "keyidx": 0,
         "pubkey": "032173996ba61da17cf20a15bbd72bc6f1e6dcace0ffa55e0a8c4de6cb1fde0cd4",
         "p2sh": "2N5tGiR5EkCv8gMYAs9myqQ7R6Wkgkcc1L5",
         "p2sh_redeemscript": "0014a0064ff5b87368717f4d7f8f7d84f8aa41de10e9",
         "bech32": "bcrt1q5qryladcwd58zl6d078hmp8c4fqauy8fj4vsrv",
         "bech32_redeemscript": "a0064ff5b87368717f4d7f8f7d84f8aa41de10e9"
      }
   ]
}

the second is:

$ l2-cli getinfo
{
   "id": "0214106517c1a81bf2dd8a3f37f6438e264ee17e270ed5c08110f584863f9bfa99",
   "alias": "BOB",
   "color": "021410",
   "num_peers": 0,
   "num_pending_channels": 0,
   "num_active_channels": 0,
   "num_inactive_channels": 0,
   "address": [],
   "binding": [
      {
         "type": "ipv4",
         "address": "127.0.0.1",
         "port": 9090
      }
   ],
   "version": "v0.8.2-269-g6014644",
   "blockheight": 1,
   "network": "regtest",
   "msatoshi_fees_collected": 0,
   "fees_collected_msat": "0msat",
   "lightning-dir": "/tmp/l2-regtest/regtest"
}
$ l2-cli  dev-listaddrs
{
   "addresses": [
      {
         "keyidx": 0,
         "pubkey": "03ac7ca112d8459dd119e83be0242f7f9f8e3c0b44286cb262d84aa3d99fe62628",
         "p2sh": "2MsoPq7yYttm63u8yzRGgnYs44TTEe7z6ZS",
         "p2sh_redeemscript": "001463550e0be42780fef27416d022943739cfd06423",
         "bech32": "bcrt1qvd2suzlyy7q0aun5zmgz99ph888aqeprvsg6sw",
         "bech32_redeemscript": "63550e0be42780fef27416d022943739cfd06423"
      }
   ]
}

Alice has 50 bitcoins in bcrt1q5qryladcwd58zl6d078hmp8c4fqauy8fj4vsrv
Alice connects to BOB

$ l1-cli connect 0214106517c1a81bf2dd8a3f37f6438e264ee17e270ed5c08110f584863f9bfa99 127.0.0.1:9090
{
   "id": "0214106517c1a81bf2dd8a3f37f6438e264ee17e270ed5c08110f584863f9bfa99",
   "features": "02aaa2"
}

Alice creates a channel with 0.05 bitcoin = 50000000000msat

l1-cli fundchannel 0214106517c1a81bf2dd8a3f37f6438e264ee17e270ed5c08110f584863f9bfa99 5000000000msat                                │
{                                                                                                                                     │
   "tx": "02000000000101e5fd718b998672b2b38747f010676fc1300b8cb063649e8a922637941bbce6060000000000feffffff02404b4c0000000000220020b7e3│
dec987315eaf340075d2a06fb92961f7e6578285d7c2e418da449c17fd9d26a6b9290100000016001406d177ca4906c71db5d4240e31468ad6d93f3989024730440220│
4b35306bb23701b24102b3933289cd1e7a0b67c875d965c337cd7357946f1b9e022031f98d8f318d2b72d8f3621c2005378a78a103a6169536b940e31f51e05c8d2f01│
21032173996ba61da17cf20a15bbd72bc6f1e6dcace0ffa55e0a8c4de6cb1fde0cd400000000",                                                        │
   "txid": "dbb8a5f98d465c6cf438b8166a438a09c8118f2b62960ef99403be00e1ced8a6",                                                        │
   "channel_id": "a6d8cee100be0394f90e96622b8f11c8098a436a16b838f46c5c468df9a5b8db"                                                   │
} 

Now I check the funding transaction

bitcoin-cli getrawtransaction dbb8a5f98d465c6cf438b8166a438a09c8118f2b62960ef99403be00e1ced8a6 2

"vout": [
    {
      "value": 0.05000000,
      "n": 0,
      "scriptPubKey": {
        "asm": "0 b7e3dec987315eaf340075d2a06fb92961f7e6578285d7c2e418da449c17fd9d",
        "hex": "0020b7e3dec987315eaf340075d2a06fb92961f7e6578285d7c2e418da449c17fd9d",
        "reqSigs": 1,
        "type": "witness_v0_scripthash",
        "addresses": [
          "bcrt1qkl3aajv8x9027dqqwhf2qmae99sl0ejhs2za0shyrrdyf8qhlkwsgphj96"
        ]
      }
    },
    {
      "value": 49.94999846,
      "n": 1,
      "scriptPubKey": {
        "asm": "0 06d177ca4906c71db5d4240e31468ad6d93f3989",
        "hex": "001406d177ca4906c71db5d4240e31468ad6d93f3989",
        "reqSigs": 1,
        "type": "witness_v0_keyhash",
        "addresses": [
          "bcrt1qqmgh0jjfqmr3mdw5ys8rz3526mvn7wvf5pklnl"
        ]
      }
    }
  ],

That address bcrt1qkl3aajv8x9027dqqwhf2qmae99sl0ejhs2za0shyrrdyf8qhlkwsgphj96 is Segwit multisig.
Now If I check addr in l1 I can see

$ l1-cli  dev-listaddrs
{
   "addresses": [
      {
         "keyidx": 0,
         "pubkey": "032173996ba61da17cf20a15bbd72bc6f1e6dcace0ffa55e0a8c4de6cb1fde0cd4",
         "p2sh": "2N5tGiR5EkCv8gMYAs9myqQ7R6Wkgkcc1L5",
         "p2sh_redeemscript": "0014a0064ff5b87368717f4d7f8f7d84f8aa41de10e9",
         "bech32": "bcrt1q5qryladcwd58zl6d078hmp8c4fqauy8fj4vsrv",
         "bech32_redeemscript": "a0064ff5b87368717f4d7f8f7d84f8aa41de10e9"
      },
      {
         "keyidx": 1,
         "pubkey": "03841e0be7af4049e44818cfab5248128806e22103b6177a0915e18fdb683875c8",
         "p2sh": "2N6aAJa7kbCVFx8cNMjRskR2beACY6AaPBA",
         "p2sh_redeemscript": "00146e289f089c56abb767fecd3e189489eb619ffa74",
         "bech32": "bcrt1qdc5f7zyu264mwel7e5lp39yfadsel7n5hnp04r",
         "bech32_redeemscript": "6e289f089c56abb767fecd3e189489eb619ffa74"
      },
      {
         "keyidx": 2,
         "pubkey": "020f91c2b34bc3a8cf3b56279fb7cae5a24ed3fb571cdfca2c35064e1d17d57b18",
         "p2sh": "2N5WmmNYJCr8eK2nJvf8N8QwV9zj9Lxree2",
         "p2sh_redeemscript": "0014751389f7ad7f0426e8fed655c0e40de0c06c3781",
         "bech32": "bcrt1qw5fcnaad0uzzd6876e2upeqdurqxcdup20v8lj",
         "bech32_redeemscript": "751389f7ad7f0426e8fed655c0e40de0c06c3781"
      },
      {
         "keyidx": 3,
         "pubkey": "03c2ecd5456ebf61168ef9536da277772c308798a5635f83e9ed60233bdf620958",
         "p2sh": "2N1rzfyGXpbPPjr7FhZsvaaaFiifvrxiEyd",
         "p2sh_redeemscript": "001478624d2bcd45fe2adf8c479a171634209adac754",
         "bech32": "bcrt1q0p3y627dghlz4huvg7dpw935yzdd4365xje7v5",
         "bech32_redeemscript": "78624d2bcd45fe2adf8c479a171634209adac754"
      },
      {
         "keyidx": 4,
         "pubkey": "033a1f02a7c19cba180defc087fdc0b48636a3d61adc4eb9d5ca1e8e6f21b12284",
         "p2sh": "2MvZeMyFSN4UWtYnTEBcTdtCjBi8kNVKKum",
         "p2sh_redeemscript": "001406d177ca4906c71db5d4240e31468ad6d93f3989",
         "bech32": "bcrt1qqmgh0jjfqmr3mdw5ys8rz3526mvn7wvf5pklnl",
         "bech32_redeemscript": "06d177ca4906c71db5d4240e31468ad6d93f3989"
      },
      {
         "keyidx": 5,
         "pubkey": "03c0032537904220bd32be2f8431597f4a49b23300face9212a49b469470b99ec3",
         "p2sh": "2NCARQgcBZzmYK6CfvTW1XMGXv2pddZnrxh",
         "p2sh_redeemscript": "0014a22f05c2da4a52fbef434d67b1fda4c228990145",
         "bech32": "bcrt1q5ghstsk6fff0hm6rf4nmrldycg5fjq29xt5gpx",
         "bech32_redeemscript": "a22f05c2da4a52fbef434d67b1fda4c228990145"
      }
   ]
}

and in l2 I can see

$ l2-cli  dev-listaddrs
{
   "addresses": [
      {
         "keyidx": 0,
         "pubkey": "03ac7ca112d8459dd119e83be0242f7f9f8e3c0b44286cb262d84aa3d99fe62628",
         "p2sh": "2MsoPq7yYttm63u8yzRGgnYs44TTEe7z6ZS",
         "p2sh_redeemscript": "001463550e0be42780fef27416d022943739cfd06423",
         "bech32": "bcrt1qvd2suzlyy7q0aun5zmgz99ph888aqeprvsg6sw",
         "bech32_redeemscript": "63550e0be42780fef27416d022943739cfd06423"
      },
      {
         "keyidx": 1,
         "pubkey": "02e28aaf512284c08336782769b9af1eb816970f99b6fadb2faa5c0d65ddc24d7e",
         "p2sh": "2MvpYKgQ7hY4q86WSn5FQALFjezAtxuyvBM",
         "p2sh_redeemscript": "00143c67dd58505ad35c30dc19db622659dfc543566e",
         "bech32": "bcrt1q83na6kzsttf4cvxur8dkyfjemlz5x4nwxq9kpz",
         "bech32_redeemscript": "3c67dd58505ad35c30dc19db622659dfc543566e"
      }
   ]
}

Why I have several address in l1?
How Can I get bcrt1qkl3aajv8x9027dqqwhf2qmae99sl0ejhs2za0shyrrdyf8qhlkwsgphj96?

I tried with public keys of l1 and public key of l2, but without lucky

$  bitcoin-cli createmultisig 2 '["032173996ba61da17cf20a15bbd72bc6f1e6dcace0ffa55e0a8c4de6cb1fde0cd4","03ac7ca112d8459dd119e83be0242f7f9f8e3c0b44286cb262d84aa3d99fe62628"]' "bech32"
 bitcoin-cli createmultisig 2 '["03841e0be7af4049e44818cfab5248128806e22103b6177a0915e18fdb683875c8","03ac7ca112d8459dd119e83be0242f7f9f8e3c0b44286cb262d84aa3d99fe62628"]' "bech32"
 bitcoin-cli createmultisig 2 '["020f91c2b34bc3a8cf3b56279fb7cae5a24ed3fb571cdfca2c35064e1d17d57b18","03ac7ca112d8459dd119e83be0242f7f9f8e3c0b44286cb262d84aa3d99fe62628"]' "bech32"
 bitcoin-cli createmultisig 2 '["03c2ecd5456ebf61168ef9536da277772c308798a5635f83e9ed60233bdf620958","03ac7ca112d8459dd119e83be0242f7f9f8e3c0b44286cb262d84aa3d99fe62628"]' "bech32"
 bitcoin-cli createmultisig 2 '["033a1f02a7c19cba180defc087fdc0b48636a3d61adc4eb9d5ca1e8e6f21b12284","03ac7ca112d8459dd119e83be0242f7f9f8e3c0b44286cb262d84aa3d99fe62628"]' "bech32"
 bitcoin-cli createmultisig 2 '["03c0032537904220bd32be2f8431597f4a49b23300face9212a49b469470b99ec3","03ac7ca112d8459dd119e83be0242f7f9f8e3c0b44286cb262d84aa3d99fe62628"]' "bech32"
{
  "address": "bcrt1qdynj6dv4zq03ldfregnl3wwppt4gu0wm8xhn7gma48mg3s8vxswsau88sc",
  "redeemScript": "5221032173996ba61da17cf20a15bbd72bc6f1e6dcace0ffa55e0a8c4de6cb1fde0cd42103ac7ca112d8459dd119e83be0242f7f9f8e3c0b44286cb262d84aa3d99fe6262852ae"
}
{
  "address": "bcrt1q5kvw3x3gafcg83w6klfrdtdta6dmptc35fyxty58kzr7wzd3n83q46t7x6",
  "redeemScript": "522103841e0be7af4049e44818cfab5248128806e22103b6177a0915e18fdb683875c82103ac7ca112d8459dd119e83be0242f7f9f8e3c0b44286cb262d84aa3d99fe6262852ae"
}
{
  "address": "bcrt1q5fg097ujz8cl0hum4xt9x6mygzqhlvgkggkwqdlv7rvj8n0npk6qnzslpz",
  "redeemScript": "5221020f91c2b34bc3a8cf3b56279fb7cae5a24ed3fb571cdfca2c35064e1d17d57b182103ac7ca112d8459dd119e83be0242f7f9f8e3c0b44286cb262d84aa3d99fe6262852ae"
}
{
  "address": "bcrt1qhzj0jgl56uatnxdzhwczrf08ku9a6c7x7fjldsnrkam75evlzywsn4ww6w",
  "redeemScript": "522103c2ecd5456ebf61168ef9536da277772c308798a5635f83e9ed60233bdf6209582103ac7ca112d8459dd119e83be0242f7f9f8e3c0b44286cb262d84aa3d99fe6262852ae"
}
{
  "address": "bcrt1qsjm7zc0rhpzjmrldht7rxhp0y5ldu7c53da0fyr2jq3l9u03lz3q47r3r7",
  "redeemScript": "5221033a1f02a7c19cba180defc087fdc0b48636a3d61adc4eb9d5ca1e8e6f21b122842103ac7ca112d8459dd119e83be0242f7f9f8e3c0b44286cb262d84aa3d99fe6262852ae"
}
{
  "address": "bcrt1qgsp7ltzlq9qcqmqr2eqd5h8zm87ch9zfdfj256nzsuk4ys2nc4asr0sqxk",
  "redeemScript": "522103c0032537904220bd32be2f8431597f4a49b23300face9212a49b469470b99ec32103ac7ca112d8459dd119e83be0242f7f9f8e3c0b44286cb262d84aa3d99fe6262852ae"
}

hard drive – Just received a quote to repair an HDD that went bad on my old laptop 5-6 years ago. Was quoted ~$1750 to retrieve data, really? Is this a rip off?

About 5 or 6 years ago I had a laptop HDD go bad on me (wouldn’t boot anymore). I removed the HDD and have had it stored away since then because it has almost all of our pictures/videos of my son’s very early years. It is very important to my wife and me, obviously.

Recently I tried to connect it to my PC using a SATA cable, but I could not get BIOS to recognize the disk exists. I can hear/feel the HDD spin, but no matter what connections I used I could not get BIOS to see it.

Considering the importance of the data I sent it to werecoverdata.com and paid a $95 diagnostics fee.

The quote I was provided was $1750, (the cheapest of the time frame options). I asked what the issues were and this is what I was told: “The hard drive is unstable and has System Area issue.”

I’ve done some googling and see a lot of references to programs that allegedly fix unstable sectors, which I’m assuming is what “unstable” means. System Area doesn’t mean much to me.

Ultimately I need the data off of the HDD, but $1750 seems pretty steep, especially if they just run some program I can download for $50 to get the data off.

I could really use some other opinions, ideas, thoughts on this price.

How to make a complete factory reset, without anyone being able to retrieve my data?

I will have a few Android phones that I will have to let go.

I would like to make a proper clean wipe of the data, without no one being able to retrieve them, and do a factory reset.

I have read about the Schneier Method, encrypting the device before doing a factory reset, doing both, etc.

Since I am not an Android/adb guru, I would like to know if some of you would have some idea on how to achieve this with certainty.

I know “certainty” is a big word when it comes to proper data erasure on flash memory but still.

I have found some answers here and somewhere else, saying that encrypting and doing a factory reset on your Android device is enough, but I could not find a reliable source.

Just a few information that could be useful:

  • I’m running Linux as my OS and, therefore, I’m not looking for a Windows-based solution
  • My devices are non-rooted and (almost) identical (Samsung A510F + 1 A510FD)

How to retrieve values from an array of json objects in PostgreSQL?

I have the following json :

({“transition”:”random_word”,”from”:”paris”,”to”:”porto”,”date”:{“date”:”2020-05-28 11:51:25.201864″,”timezone_type”:3,”timezone”:”Europe/Paris”}},

{“transition”:”rainbow”,”from”:”porto”,”to”:”faro”,”date”:{“date”:”2020-06-06 23:10:06.878539″,”timezone_type”:3,”timezone”:”Europe/Paris”}},

{“transition”:”banana”,”from”:”faro”,”to”:”rio_de_janeiro”,”date”:{“date”:”2020-06-06 23:14:10.975099″,”timezone_type”:3,”timezone”:”Europe/Paris”}},

{“transition”:”hello”,”from”:”rio_de_janeiro”,”to”:”buenos_aires”,”date”:{“date”:”2020-06-06 23:14:15.314370″,”timezone_type”:3,”timezone”:”Europe/Paris”}})

Imagine I want to retrieve the last stop of my traveler (the value of the key “to” from the last json object. Here : buenos_aires) and the date (here :2020-06-06 23:14:15.314370).

How should I proceed knowing that I want to do that using PostgreSQL ?

Thank you a lot for your help !