Skip to content

Instantly share code, notes, and snippets.

@phpfiddle
Created November 6, 2017 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phpfiddle/29268bebb400dd0ad70afdf200f98920 to your computer and use it in GitHub Desktop.
Save phpfiddle/29268bebb400dd0ad70afdf200f98920 to your computer and use it in GitHub Desktop.
[ Posted by Robert ] rate table sorting
<?php
$json = '{
"products": [{
"apr": 3.984,
"armIndex": "",
"closingCost": 2584.0,
"lastUpdate": "2017-11-06T08:27:05.607",
"loanTerm": "30 Yr",
"lockPeriod": 30,
"armMargin": 0.000,
"price": 100.000,
"rate": 3.875,
"rebate": 0.0,
"discount": 0.0,
"principalAndInterest": 893.0,
"amortizationTerm": "30",
"amortizationType": "Fixed",
"investor": "BB&T - ",
"loanType": "Conforming",
"priceStatus": "Available",
"pendingUpdate": false,
"productCode": "101",
"productId": 18243808,
"productName": "BB&T - Conforming 30 Yr Fixed",
"guidelines": [{
"documentDescription": "BB&T Conforming Conventional Fixed",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=10025_10242017_0700049389.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
}]
},
{
"apr": 4.11,
"armIndex": "",
"closingCost": 1634.0,
"lastUpdate": "2017-11-06T08:27:05.607",
"loanTerm": "30 Yr",
"lockPeriod": 30,
"armMargin": 0.000,
"price": 100.500,
"rate": 4.000,
"rebate": 950.0,
"discount": 0.0,
"principalAndInterest": 907.0,
"amortizationTerm": "30",
"amortizationType": "Fixed",
"investor": "BB&T - ",
"loanType": "Conforming",
"priceStatus": "Available",
"pendingUpdate": false,
"productCode": "153",
"productId": 18244022,
"productName": "BB&T - Home Now 30 Yr Fixed",
"guidelines": [{
"documentDescription": "BB&T Home Now Fixed",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=10028_09262017_0700047239.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
}]
},
{
"apr": 3.859,
"armIndex": "",
"closingCost": 2109.0,
"lastUpdate": "2017-11-06T08:58:00.103",
"loanTerm": "30 Yr",
"lockPeriod": 30,
"armMargin": 0.000,
"price": 100.250,
"rate": 3.750,
"rebate": 475.0,
"discount": 0.0,
"principalAndInterest": 880.0,
"amortizationTerm": "30",
"amortizationType": "Fixed",
"investor": "Citi - ",
"loanType": "Conforming",
"priceStatus": "Available",
"pendingUpdate": false,
"productCode": "",
"productId": 18244204,
"productName": "Citi - Agency 30 Yr Fixed",
"guidelines": [{
"documentDescription": "Citi AllRegs 201: Agency Fixed Rate",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8215_03272017_0703498575.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 400: Agency Conforming LTV/FICO Matrixes",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8230_10162017_0701346338.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 401: CMI-Standard",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8245_09252017_0701074752.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 405: Corporate Relocation Standard",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8249_04242017_0704419313.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 406: Fannie Mae Desktop Underwriter",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8250_10162017_0701357744.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 407: Freddie Mac Loan Product Advisor",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8251_08212017_0701182260.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 410: Texas Section 50(A)(6)",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8253_10252017_0701395814.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 802: Loan Limits",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8258_01232017_0702410430.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 803: Borrower Information",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8259_09252017_0701136182.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 804: Ratio/Liabilities",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8260_10162017_0701378772.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 805: Employment & Income",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8261_10162017_0701375830.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 806: Assets",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8262_08222016_0701567634.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 807: Credit",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8263_10162017_0701392835.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 808: Property",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8264_10182017_0701379524.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 809_occupancy",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8265_06262017_0704147678.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 810: Eligible Transactions",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8266_06262017_0704149503.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 812: Market Restrictions",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8268_12202013_0703434219.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 813: Construction/Permanent Loan",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8269_10172016_0705166658.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 815: Declining Market Policy and Listing",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8270_10252012_1331076655.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi Credit Overlay Guideline",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=10217_10232017_0808192966.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 416: Higher Priced Mortgage Loan",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=10238_05262014_0704574630.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
}
]
},
{
"apr": 3.859,
"armIndex": "",
"closingCost": 2109.0,
"lastUpdate": "2017-11-06T08:58:00.103",
"loanTerm": "30 Yr",
"lockPeriod": 30,
"armMargin": 0.000,
"price": 100.250,
"rate": 3.750,
"rebate": 475.0,
"discount": 0.0,
"principalAndInterest": 880.0,
"amortizationTerm": "30",
"amortizationType": "Fixed",
"investor": "Citi - ",
"loanType": "Conforming",
"priceStatus": "Available",
"pendingUpdate": false,
"productCode": "",
"productId": 18244610,
"productName": "Citi - Agency Freddie Mac Home Possible 30 Yr Fixed",
"guidelines": [{
"documentDescription": "Citi AllRegs 235: Freddie Mac Home Possible",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8242_10162017_0701348660.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 401: CMI-Standard",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8245_09252017_0701074752.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 405: Corporate Relocation Standard",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8249_04242017_0704419313.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 407: Freddie Mac Loan Product Advisor",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8251_08212017_0701182260.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 408: Community Lending",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8252_09252017_0701085453.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 802: Loan Limits",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8258_01232017_0702410430.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 803: Borrower Information",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8259_09252017_0701136182.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 804: Ratio/Liabilities",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8260_10162017_0701378772.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 805: Employment & Income",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8261_10162017_0701375830.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 806: Assets",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8262_08222016_0701567634.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 807: Credit",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8263_10162017_0701392835.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 808: Property",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8264_10182017_0701379524.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 809_occupancy",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8265_06262017_0704147678.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 810: Eligible Transactions",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8266_06262017_0704149503.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 812: Market Restrictions",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8268_12202013_0703434219.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 813: Construction/Permanent Loan",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8269_10172016_0705166658.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 815: Declining Market Policy and Listing",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=8270_10252012_1331076655.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi Credit Overlay Guideline",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=10217_10232017_0808192966.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Citi AllRegs 416: Higher Priced Mortgage Loan",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=10238_05262014_0704574630.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
}
]
},
{
"apr": 3.984,
"armIndex": "",
"closingCost": 1634.0,
"lastUpdate": "2017-07-28T09:34:15.55",
"loanTerm": "30 Yr",
"lockPeriod": 30,
"armMargin": 0.000,
"price": 100.500,
"rate": 3.875,
"rebate": 950.0,
"discount": 0.0,
"principalAndInterest": 893.0,
"amortizationTerm": "30",
"amortizationType": "Fixed",
"investor": "US Bank National Correspondent - ",
"loanType": "Conforming",
"priceStatus": "Expired",
"pendingUpdate": false,
"productCode": "3501/3505",
"productId": 18245792,
"productName": "US Bank National Correspondent - FNMA Conforming 30 Yr Fixed ",
"guidelines": [{
"documentDescription": "Conventional Programs - Fixed - Conforming - 3501: FNMA Conforming 30-25 Year Fixed Rate",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=5080_07132017_0721140465.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Conventional Programs - Fixed - Conforming - 3505: FNMA Conforming 30 Year Fixed Rate - Non Owner Occupied",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=5083_07132017_0721379939.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
}
]
},
{
"apr": 4.11,
"armIndex": "",
"closingCost": 2346.0,
"lastUpdate": "2017-07-28T09:34:15.55",
"loanTerm": "30 Yr",
"lockPeriod": 30,
"armMargin": 0.000,
"price": 100.125,
"rate": 4.000,
"rebate": 238.0,
"discount": 0.0,
"principalAndInterest": 907.0,
"amortizationTerm": "30",
"amortizationType": "Fixed",
"investor": "US Bank National Correspondent - ",
"loanType": "Conforming",
"priceStatus": "Expired",
"pendingUpdate": false,
"productCode": "3687",
"productId": 18245879,
"productName": "US Bank National Correspondent - Conforming Home Possible 30 Yr Fixed",
"guidelines": [{
"documentDescription": "Conventional Programs - 97% - Fixed Rate - 3687: Home Possible 97% LTV ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=5153_08242017_0713520887.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
}]
},
{
"apr": 3.984,
"armIndex": "",
"closingCost": 1634.0,
"lastUpdate": "2017-07-28T09:34:15.55",
"loanTerm": "30 Yr",
"lockPeriod": 30,
"armMargin": 0.000,
"price": 100.500,
"rate": 3.875,
"rebate": 950.0,
"discount": 0.0,
"principalAndInterest": 893.0,
"amortizationTerm": "30",
"amortizationType": "Fixed",
"investor": "US Bank National Correspondent - ",
"loanType": "Conforming",
"priceStatus": "Expired",
"pendingUpdate": false,
"productCode": "3601",
"productId": 18246117,
"productName": "US Bank National Correspondent - Conforming FHLMC 30 Yr Fixed",
"guidelines": [{
"documentDescription": "Conventional Programs - Fixed - Conforming - 3601: FHLMC Fixed Rate Conforming 30-25 Year ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=5090_04262017_0729466790.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
}]
},
{
"apr": 3.859,
"armIndex": "",
"closingCost": 2346.0,
"lastUpdate": "2017-11-06T10:05:44.937",
"loanTerm": "30 Yr",
"lockPeriod": 30,
"armMargin": 0.000,
"price": 100.125,
"rate": 3.750,
"rebate": 238.0,
"discount": 0.0,
"principalAndInterest": 880.0,
"amortizationTerm": "30",
"amortizationType": "Fixed",
"investor": "Wells Fargo - ",
"loanType": "Conforming",
"priceStatus": "Available",
"pendingUpdate": false,
"productCode": "",
"productId": 18246575,
"productName": "Wells Fargo - Conforming 30 Yr Fixed",
"guidelines": [{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 800.01a: Wells Fargo Underwriting Philosophy",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3887_01042013_1112171664.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 800.01(c): Identity of Interest Transactions Guiding Principles ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3890_10252017_0720392233.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 800.03: Conventional Underwriting ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3892_12072016_0850016680.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 800.07: Credit Score Reporting",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3896_05172017_0724191475.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 805.05: Delegated Underwriting",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3900_05312017_0723084932.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 805.06: Fannie Mae Desktop Underwriter",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3901_09132017_0717161961.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 805.07: Freddie Mac Loan Product Advisor",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3902_07122017_0719154574.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 805.09: Wells Fargo Funding Direct Express ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3904_10302012_0710404100.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.01: General Information ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3905_10252012_1214057199.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.02: Title Holder General Requirements ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3906_06142017_0903401769.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.04: Non-U.S. Citizen Borrowers",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3909_05312017_0724206588.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.05: Income Analysis",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3910_04122017_0721281185.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.07(a): Subordinate Financing ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3912_10112017_0721349936.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.08: Cash Assets",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3914_10252017_0722505871.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.09: Reserves",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3915_05232016_0835165169.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W -820.11: Credit History ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3917_02172016_0720006109.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.12: Long Term Debt ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3918_05172016_0722394076.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.13(a): Age of Documents ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3919_08162017_0720259258.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.13(b): Alternative Documentation ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3920_07122017_0720360944.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.14(a): Specific Property Locations ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3921_05192015_0718477390.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.14(b): Specific Property Types",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3922_10252017_0723498020.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.14(c): At Risk Markets ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3923_10252012_1224138894.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.14(d): Resale Deed Restrictions ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3924_03012017_0840201734.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.19: Disasters ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3929_09152017_0720249738.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.20: When Required ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3930_09152017_0720358174.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.21: Refinance Requirements ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3931_10112017_0723103424.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.25: New Construction ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3935_07122016_0722391826.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.26: Identity of Interest Transactions ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3936_10252017_0724372830.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.27: Appraisal Forms ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3937_02152017_0720394569.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.30: Contributions ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3940_10112017_0723341525.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.31: Tax and Insurance Escrows ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3942_08022016_0716371782.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.34: Single Close Construction",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3945_07132016_0720296685.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 820.35: Downpayment Assistance Programs",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3946_01272015_0846304267.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W -820.40: Texas - Owner Occupied, Homestead Property ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3948_10262017_0724518710.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: Non-Conforming - 825.20: Relocation ",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3972_07122017_0723225885.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 850: Qualifying Ratio Tables",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3990_10112017_0725569690.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 900: CONV ELIGIBLE LOAN PRODUCTS - 905: Fixed Rate",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=3992_06142017_0934258584.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "WF Seller Guide - SEC 800: CONV U/W - 860: Private Mortgage Insurance",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=22212_09132017_0724470128.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
},
{
"documentDescription": "Conforming Conventional Loan Policy Overlay Fact Sheet",
"guidelineLink": {
"rel": "self",
"href": "https://marketplace.optimalblue.com/full/api/guideline?isIndex=False&value=24060_09152017_0700089184.pdf",
"action": "GET",
"fileExtension": "pdf",
"types": [
"application/pdf"
]
}
}
]
}]}';
$array = json_decode($json, true);
//dd($array);
//array_multisort($volume, SORT_DESC, $edition, SORT_ASC, $data);
foreach ($array['products'] as $item) {
$data[] = $item;
}
foreach ($data as $key => $row) {
$rate[$key] = $row['rate'];
$closingCost[$key] = $row['closingCost'];
}
// Sort the data with volume descending, edition ascending
// Add $data as the last parameter, to sort by the common key
array_multisort($rate, SORT_ASC, $closingCost, SORT_ASC, $data);
echo '<table>
<thead>
<tr>
<th>Product Name</th><th>Rate</th><th>Closing Costs</th>
</tr>
</thead>
<tbody>
';
foreach ($data as $key => $value) {
echo '<tr>';
echo '<td>' . $value['productName'] . '</td>';
echo '<td>' . $value['rate'] . '</td>';
echo '<td>' . $value['closingCost'] . '</td>';
echo '</tr>';
}
echo '</tbody></table>';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment