{"id":3954,"date":"2022-03-28T17:34:02","date_gmt":"2022-03-29T01:34:02","guid":{"rendered":"https:\/\/wonghoi.humgar.com\/blog\/?p=3954"},"modified":"2025-12-01T15:02:53","modified_gmt":"2025-12-01T23:02:53","slug":"powershell-notes-for-matlab-python-users","status":"publish","type":"post","link":"https:\/\/wonghoi.humgar.com\/blog\/2022\/03\/28\/powershell-notes-for-matlab-python-users\/","title":{"rendered":"Powershell notes (for MATLAB\/python users)"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Data Type characteristics<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><\/td><td>Powershell<\/td><td>MATLAB<\/td><td>Python<\/td><\/tr><tr><td>Nearly everything is a\/an<\/td><td>Object<\/td><td>Matrix (APL-philosophy)<\/td><td>Object (which are dictionaries)<\/td><\/tr><tr><td>Assignment behavior*<\/td><td>Reassigned reference<\/td><td>Copy-on-write<\/td><td>Reassigned reference<\/td><\/tr><tr><td>Heterogenous data containers<\/td><td>Array\/Collections<\/td><td>Cells<\/td><td>Lists<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>* Shallow assignment (transferring reference only) means the LHS does not have its own copy, so modifying the new reference will modify the underlying data on the RHS.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Syntax \/ Usage<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><\/td><td>Powershell<\/td><td>MATLAB<\/td><td>Python<\/td><\/tr><tr><td>Method chaining<\/td><td>Yes<\/td><td>Might misbehave<\/td><td>Yes<\/td><\/tr><tr><td>List Comprehension<\/td><td><a href=\"https:\/\/stackoverflow.com\/questions\/24090546\/powershell-function-within-array-comprehension\" target=\"_blank\" rel=\"noreferrer noopener\">&#8211;<\/a><\/td><td>No. Map first then filter<\/td><td>Yes<\/td><\/tr><tr><td>Named input arguments<\/td><td>Native<br><code>f -a 1 -b 22<\/code><\/td><td>Name-Value pairs parsed inside<\/td><td>Native<br><code>f(a=13, b=22)<\/code><\/td><\/tr><tr><td>Implicit NON-NULL return value<\/td><td>Optional<\/td><td>&#8211;<\/td><td>&#8211;<\/td><\/tr><tr><td>Binary map operation<\/td><td>&#8211;<\/td><td>Native matrix ops<br><code>*fun()<\/code> does n-ary<\/td><td>Use numpy<br><code>list( map(<a href=\"https:\/\/stackoverflow.com\/questions\/18713321\/element-wise-addition-of-2-lists\">operator.add<\/a>, L1, L2) )<\/code><\/td><\/tr><tr><td>Check Type<\/td><td><code>$g -is [type]<\/code><\/td><td><code>is*()<\/code> or <code>isa()<\/code><\/td><td><code>isinstance(val, type)<\/code><\/td><\/tr><tr><td>Unpacking (flattening)<br>arbitrary containers<\/td><td>Default<br>Use unary <code>,<\/code> to avoid<\/td><td>No<br>Use <code>[{:}]<\/code> to perform<\/td><td>No<br><a href=\"https:\/\/datascienceparichay.com\/article\/python-flatten-a-list-of-lists-to-a-single-list\/\" target=\"_blank\" rel=\"noreferrer noopener\">Use<\/a> *, list comp, or<br><code>list(itertools.chain(*ls))<\/code><\/td><\/tr><tr><td>Conditional\/statement block inside container creation<\/td><td>Yes<\/td><td>&#8211;<\/td><td>?<\/td><\/tr><tr><td>View Object Info with Data<\/td><td><code>| Format-List -Property *<\/code><br>or <br><code>Format-List -InputObject<\/code><\/td><td><code>properties()<\/code><br><code>methods()<\/code><br><code>get()<\/code><\/td><td><\/td><\/tr><tr><td>List members (method and properties)&#8217;s prototypes<\/td><td><code>| Get-Member<\/code><\/td><td><\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Powershell specific<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The UNCAPTURED output value in the last line of the block is the return value! Unary side effect statements such as <code>$x++<\/code> do not have output value. Watch out for statements that looks like it&#8217;s going nowhere at the end of the code as these are not nop\/bugs, but <code>return<\/code> value. This has the same stench as fall-throughs. <\/li>\n\n\n\n<li><code>foreach()<\/code> follows the last uncaptured output value return rule above doing a 1-to-1 map from the input collection to output collection (you can <a href=\"https:\/\/evotec.xyz\/powershell-few-tricks-about-hashtable-and-array-i-wish-i-knew-when-i-started\/\" target=\"_blank\" rel=\"noreferrer noopener\">assign output<\/a> to <code>foreach()<\/code> as it&#8217;s also seen as a function)<\/li>\n\n\n\n<li>Powershell suck at binary operations between two arrays. Just an elementwise A+B you&#8217;d be thinking in terms of loops and worry about dimensions. <\/li>\n\n\n\n<li>You can put if and loop blocks inside collections list construction, like this:<\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">@( 3, if(cond1){...; $v1}  do{...; $v2}while(cond2) )<\/pre>\n\n\n\n<p>MATLAB specific<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When used with classes and custom matrices\/arrays, chaining fields\/properties\/methods by indices often do not work, when they do, they often give out only the first element instead of the entire array (IIRC, there are operator methods that needs to be coordinated in the classes involved to make sure they chain correctly). In short, just don&#8217;t chain unless in very simple, scalar cases. Always output it to a variable a access the leaf. <\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Range &amp; <a href=\"https:\/\/powershellexplained.com\/2018-10-15-Powershell-arrays-Everything-you-wanted-to-know\/#special-index-tricks\">Indexing<\/a><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><\/td><td>Powershell<\/td><td>MATLAB<\/td><td>Python<\/td><\/tr><tr><td>Logical Indexing<\/td><td>&#8211;<\/td><td>Yes<\/td><td>No. Use <a href=\"https:\/\/stackoverflow.com\/questions\/36721383\/logical-indexing-with-lists\" target=\"_blank\" rel=\"noreferrer noopener\">list comprehension\/Numpy<\/a><\/td><\/tr><tr><td>Negative (cyclic) Indexing<\/td><td>Yes<\/td><td>&#8211;<\/td><td>Yes<\/td><\/tr><tr><td>&#8216;<code>end<\/code>&#8216; of array keyword<\/td><td>&#8211;<\/td><td>Yes<\/td><td>No. Skip <em>stop<\/em> in slice instead<\/td><\/tr><tr><td>Step (skip every n items)<\/td><td>&#8211;<\/td><td>Yes<\/td><td>Yes. Both range or slice<\/td><\/tr><tr><td>Detect descending range<\/td><td>Yes<\/td><td>&#8211;<\/td><td>&#8211;<\/td><\/tr><tr><td>Automatic extend array<\/td><td>&#8211;<\/td><td>Yes<\/td><td>&#8211;<\/td><\/tr><tr><td>Reading array out of bounds<\/td><td>Do nothing<\/td><td>Error<\/td><td>Error<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Negative (cyclic) indexing along with automatic descending range, along with the lack of &#8216;end&#8217; keyword is a huge pain in the rear when you want to scan from left to right like <code>A[5:end]<\/code>.<\/p>\n\n\n\n<p>Instead, you&#8217;ll have to do <code>$A[4..($A.length-1)]<\/code> because the range <code>4..-1<\/code> inside <code>A[4..-1]<\/code> is unrolled as <code>4,3,2,1,0,-1<\/code> (thus scanning from right to left and wraps around) without first consulting with the array <code>A<\/code> like the <code>end<\/code> keyword in MATLAB does so it can substitute the ends of the range with the array information before it unrolls. <\/p>\n\n\n\n<p>I am willing to bet that this behavior does not have a sound basis other than people thinking negative indices and descending ranges alone are two good ideas without realizing that nearly nobody freaking wants to scan from right to left and wrap around!<\/p>\n\n\n\n<p>I had the same gripes about negative indices in Python not carefully coordinating with other combinations in common use cases which cases unintuitive behavior. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Range indexing syntax<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Powershell\n1..10 # No step\/skip for range creation\nA[1..10]  # No special treatment in array such as figuring out the 'end'\n\n% MATLAB\nA[start:(step):stop]\n\n# Python\nA[range(start,stop,step)]\n# Slicing (it's not range)\nA[(start):(stop):(step)] # Can skip everything \n# In Python, A=X merely reassign the label A as the alias for X.\n# Modifying the reassigned A through A=X will modify underlying contents of X\n# To deep-copy contents without .Clone(), assign the full slice\nA[:] = X\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Hasthtable \/ Dictionaries<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">% MATLAB: Use dynamic fields in struct or containers.Map()\n# Python: dictionaries such as {a:1, b='x'}\n# Powershell: @{a=1, b='x'}<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Structs<\/h2>\n\n\n\n<p>Powershell does not have direct <code>struct<\/code> or dynamic field name <code>struct<\/code>. Instead if your object is uniform (you expect the fields not to change much), use <code>[PSCustomObject]@{}<\/code>. You can also just use simple hashtable <code>@{}<\/code>, but for some reason it doesn&#8217;t work the way I expected when put into arrays when I try to reference it by array index.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Array rules surprises<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Array comparisons are filtering operation (not boolean array output like MATLAB).  <code data-enlighter-language=\"powershell\" class=\"EnlighterJSRAW\">(0..9) -ge 5 <\/code>gives 5 to 9, not a list of False &#8230; False, True &#8230; True. To get a boolean array, use this shortcut:<\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">(0..9) | % {$_ -ge 5}<\/pre>\n\n\n\n<p>Map-filter combo syntax is <code data-enlighter-language=\"powershell\" class=\"EnlighterJSRAW\">| ?<\/code> instead of Map syntax <code data-enlighter-language=\"powershell\" class=\"EnlighterJSRAW\">| %<\/code><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Powershell array (which are heterogenous data containers) are unpacked and stacked by default (in MATLAB, I had to write a lot of routines to unpack and stack cells of cells). To keep cells packed (in MATLAB lingo, it&#8217;s like &#8216;UniformOutput&#8217;, false in cellfun), add a comma unary operator in front of the operation that are expected to be unpacked like this:<\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">.$_.Split('_')<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Set Operations<\/h2>\n\n\n\n<p>This is one of the WTF moments of Powershell as a programming language. Convenient set operations is essential for most of the routine boring stuff that involves relational data. A lot of Powershell&#8217;s intended audience works in database like environment (like IT managers dealing with Active Directory), they have <code>Group-Object<\/code> for typical data analysis tasks, yet they make life miserable just to do basic set operations like intersection and differencing! <\/p>\n\n\n\n<p>Powershell has a <code>Compare-Object<\/code>, but this is as unnatural and annoying to use as users are effectively rebuilding all 4 basic set-ops (intersection, union, set-diff, xor) based on any two! Not to mention you have to sift through table to get to the piece you wanted! <\/p>\n\n\n\n<p>Basically <code>Compare-Object<\/code> out of the box <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>is a set-diff showing both directions (A\\B and also B\\A) at the same time. If you throw away the direction info, it&#8217;s xor.<\/li>\n\n\n\n<li>if you want intersection, you&#8217;ll need to add <code>-IncludeEqual -ExcludeDiffere<\/code>nt<\/li>\n\n\n\n<li>(WTF!) If you just specify <code>-ExcludeDifferent<\/code>, by definition there&#8217;s no output because by default Compare-Object shows you ONLY the two set-diffs and you are telling it to not show any diffs!<\/li>\n\n\n\n<li>Union is specifying <code>-IncludeEqual<\/code> only. But it&#8217;d rather stack both then do a <code>| Sort-Object - Unique<\/code><\/li>\n<\/ul>\n\n\n\n<p>Some people might suggest doing <code>| ? {$_ -eq $B}<\/code> for intersection (or is-member). This is generally a bad idea if you have a lot of data because it&#8217;s in the O(n*n) runtime algorithm (loop-within-loop) while any properly done intersection algorithm will just sort then scan the adjacent item to check for duplicates, which gives O(n log(n)) time (typical sorting algorithm takes up most of the time).<\/p>\n\n\n\n<p>If you noticed, it&#8217;s set operations within the outputs of <code>Compare-Objects<\/code> with the Venn diagram of  <code style=\"font-size: revert; background-color: rgb(255, 255, 255);\">-IncludeEqual -ExcludeDiffere<\/code><span style=\"font-size: revert;\">nt<\/span>  switches! It&#8217;s doable, but totally unnecessary mindfuck that should not be repeated frequently.<\/p>\n\n\n\n<p>In MATLAB land, I made my own overloading operators that do set operation over <code>cellstr()<\/code>, categorical and tabular objects (I went into their code and added the features and talked to TMW so they added the features later), sometimes getting into their sort and indexing logic as necessary. This shows how badly do I need set operations to come naturally.<\/p>\n\n\n\n<p>One might not deal with it too much in low level languages like C++ (STL set doesn&#8217;t get used as much compared to other containers), but for a language made to get a lot of common things done (i.e. the language designer kind of reads the users mind), I&#8217;m surprised that the Powershell team overlooked the set operations! <\/p>\n\n\n\n<p>Sets are very powerful abstractions that should not be made less descriptive (hard to read) by dancing around it with equivalent operations with some programming gymnastics! If these basic stuff are not built in, we are going to see a lot of people taking ugly shortcuts to avoid coding up these bread and butter functions and put it in libraries (or downloading 3rd-party libraries)!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Powershell surprises<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Typical symbolic comparison operators do not work because &#8216;>&#8217; can be misinterpreted as redirection in command prompts. Use <a href=\"https:\/\/adsecurity.org\/?p=297\" target=\"_blank\" rel=\"noreferrer noopener\">switches<\/a> like -gt (greater than) instead. <\/li>\n\n\n\n<li>Redirection&#8217;s <a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/microsoft.powershell.core\/about\/about_character_encoding?view=powershell-7.2\" target=\"_blank\" rel=\"noreferrer noopener\">default text output uses UTF16-LE encoding<\/a> (2 bytes per character). Programs assuming ASCII (1 byte per character) might not behave as intended (e.g. if you use copy command merge an ASCII\/UTF8 file with UTF16-LE, you might end up with spaces in the sections that are formatted with UTF16-LE)<\/li>\n\n\n\n<li>Cannot extract string matches from regex without executing a <code>-match<\/code> which returns boolean unless we use the the <code>$matches$<\/code> spilled into variable space. Consider <code>[regex]::Match($Text, $Pattern).Groups[1].Value<\/code><\/li>\n\n\n\n<li>Methods are called with parenthesis yet <strong>functions are not called with parenthesis<\/strong>, just like cmd-lets! Trying to call a function with multiple input arguments with parenthesis like <code>f(3,5)<\/code> will be interpreted as calling <code>f<\/code> with ONE ARGUMENT containing an ARRAY of 3 and 5!<\/li>\n\n\n\n<li><code>Write-Host<\/code> takes everything after it literally (white spaces included, almost like echo command), with the exception of plugging in $variables! If you want anything interpreted, such as concatenation, you need to put the bracket around the whole statement!<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Libraries and Modules<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Reload module using <code data-enlighter-language=\"powershell\" class=\"EnlighterJSRAW\">Import-Module $moduleName -Force<\/code><\/li>\n<\/ul>\n<div class=\"pvc_clear\"><\/div><p id=\"pvc_stats_3954\" class=\"pvc_stats all  \" data-element-id=\"3954\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p><div class=\"pvc_clear\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Data Type characteristics Powershell MATLAB Python Nearly everything is a\/an Object Matrix (APL-philosophy) Object (which are dictionaries) Assignment behavior* Reassigned reference Copy-on-write Reassigned reference Heterogenous data containers Array\/Collections Cells Lists * Shallow assignment (transferring reference only) means the LHS does &hellip; <a href=\"https:\/\/wonghoi.humgar.com\/blog\/2022\/03\/28\/powershell-notes-for-matlab-python-users\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_3954\" class=\"pvc_stats all  \" data-element-id=\"3954\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[10,72,34,4],"tags":[],"class_list":["post-3954","post","type-post","status-publish","format-standard","hentry","category-matlab","category-powershell","category-python","category-windows"],"_links":{"self":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts\/3954","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/comments?post=3954"}],"version-history":[{"count":25,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts\/3954\/revisions"}],"predecessor-version":[{"id":6824,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts\/3954\/revisions\/6824"}],"wp:attachment":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/media?parent=3954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/categories?post=3954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/tags?post=3954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}